aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/serial.h
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2012-10-09 10:03:21 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-10-09 10:04:25 -0400
commitffe315012510165ce82e4dd4767f0a5dba9edbf7 (patch)
treef601cd980af9d0ced5ca9aedecef4fa0d2ca0e15 /include/linux/usb/serial.h
parente2d3a35ee427aaba99b6c68a56609ce276c51270 (diff)
parent4a8e43feeac7996b8de2d5b2823e316917493df4 (diff)
Merge tag 'disintegrate-mtd-20121009' of git://git.infradead.org/users/dhowells/linux-headers
UAPI Disintegration 2012-10-09 Conflicts: MAINTAINERS arch/arm/configs/bcmring_defconfig arch/arm/mach-imx/clk-imx51-imx53.c drivers/mtd/nand/Kconfig drivers/mtd/nand/bcm_umi_nand.c drivers/mtd/nand/nand_bcm_umi.h drivers/mtd/nand/orion_nand.c
Diffstat (limited to 'include/linux/usb/serial.h')
-rw-r--r--include/linux/usb/serial.h32
1 files changed, 6 insertions, 26 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 86c0b451745d..ef9be7e1e190 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -301,17 +301,13 @@ extern void usb_serial_port_softint(struct usb_serial_port *port);
301extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); 301extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message);
302extern int usb_serial_resume(struct usb_interface *intf); 302extern int usb_serial_resume(struct usb_interface *intf);
303 303
304extern int ezusb_writememory(struct usb_serial *serial, int address,
305 unsigned char *data, int length, __u8 bRequest);
306extern int ezusb_set_reset(struct usb_serial *serial, unsigned char reset_bit);
307
308/* USB Serial console functions */ 304/* USB Serial console functions */
309#ifdef CONFIG_USB_SERIAL_CONSOLE 305#ifdef CONFIG_USB_SERIAL_CONSOLE
310extern void usb_serial_console_init(int debug, int minor); 306extern void usb_serial_console_init(int minor);
311extern void usb_serial_console_exit(void); 307extern void usb_serial_console_exit(void);
312extern void usb_serial_console_disconnect(struct usb_serial *serial); 308extern void usb_serial_console_disconnect(struct usb_serial *serial);
313#else 309#else
314static inline void usb_serial_console_init(int debug, int minor) { } 310static inline void usb_serial_console_init(int minor) { }
315static inline void usb_serial_console_exit(void) { } 311static inline void usb_serial_console_exit(void) { }
316static inline void usb_serial_console_disconnect(struct usb_serial *serial) {} 312static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
317#endif 313#endif
@@ -333,7 +329,7 @@ extern void usb_serial_generic_throttle(struct tty_struct *tty);
333extern void usb_serial_generic_unthrottle(struct tty_struct *tty); 329extern void usb_serial_generic_unthrottle(struct tty_struct *tty);
334extern void usb_serial_generic_disconnect(struct usb_serial *serial); 330extern void usb_serial_generic_disconnect(struct usb_serial *serial);
335extern void usb_serial_generic_release(struct usb_serial *serial); 331extern void usb_serial_generic_release(struct usb_serial *serial);
336extern int usb_serial_generic_register(int debug); 332extern int usb_serial_generic_register(void);
337extern void usb_serial_generic_deregister(void); 333extern void usb_serial_generic_deregister(void);
338extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, 334extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,
339 gfp_t mem_flags); 335 gfp_t mem_flags);
@@ -355,30 +351,14 @@ extern struct usb_serial_driver usb_serial_generic_device;
355extern struct bus_type usb_serial_bus_type; 351extern struct bus_type usb_serial_bus_type;
356extern struct tty_driver *usb_serial_tty_driver; 352extern struct tty_driver *usb_serial_tty_driver;
357 353
358static inline void usb_serial_debug_data(int debug, 354static inline void usb_serial_debug_data(struct device *dev,
359 struct device *dev,
360 const char *function, int size, 355 const char *function, int size,
361 const unsigned char *data) 356 const unsigned char *data)
362{ 357{
363 int i; 358 dev_dbg(dev, "%s - length = %d, data = %*ph\n",
364 359 function, size, size, data);
365 if (debug) {
366 dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ",
367 function, size);
368 for (i = 0; i < size; ++i)
369 printk("%.2x ", data[i]);
370 printk("\n");
371 }
372} 360}
373 361
374/* Use our own dbg macro */
375#undef dbg
376#define dbg(format, arg...) \
377do { \
378 if (debug) \
379 printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
380} while (0)
381
382/* 362/*
383 * Macro for reporting errors in write path to avoid inifinite loop 363 * Macro for reporting errors in write path to avoid inifinite loop
384 * when port is used as a console. 364 * when port is used as a console.