patch-2.4.0-test9 linux/drivers/usb/serial/usb-serial.h
Next file: linux/drivers/usb/serial/usbserial.c
Previous file: linux/drivers/usb/serial/ftdi_sio.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Mon Sep 18 15:23:25 2000
- Orig file:
v2.4.0-test8/linux/drivers/usb/serial/usb-serial.h
- Orig date:
Tue Sep 5 13:19:08 2000
diff -u --recursive --new-file v2.4.0-test8/linux/drivers/usb/serial/usb-serial.h linux/drivers/usb/serial/usb-serial.h
@@ -11,6 +11,10 @@
*
* See Documentation/usb/usb-serial.txt for more information on using this driver
*
+ * (09/11/2000) gkh
+ * Added usb_serial_debug_data function to help get rid of #DEBUG in the
+ * drivers.
+ *
* (08/28/2000) gkh
* Added port_lock to port structure.
*
@@ -204,6 +208,18 @@
return port->serial;
}
+
+static inline void usb_serial_debug_data (const char *file, const char *function, int size, const unsigned char *data)
+{
+#ifdef CONFIG_USB_SERIAL_DEBUG
+ int i;
+ printk (KERN_DEBUG "%s: %s - length = %d, data = ", file, function, size);
+ for (i = 0; i < size; ++i) {
+ printk ("%.2x ", data[i]);
+ }
+ printk ("\n");
+#endif
+}
#endif /* ifdef __LINUX_USB_SERIAL_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)