USB Serial drivers can currently use the generic function usb_serial_generic_submit_read_urbs() to submit a group of urbs when starting up the device. The read bulk callback needs to be able to submit a single urb. usb_serial_generic_submit_read_urb() does this, but it is not exported and so only usable within generic functions, in particular usb_serial_generic_read_bulk_callback(). Export this function so drivers can use it in there own read bulk callback routine. Signed-off-by: Andrew Lunn <andrew@xxxxxxx> --- drivers/usb/serial/generic.c | 5 +++-- include/linux/usb/serial.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 297665f..13e9b3b 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -253,8 +253,8 @@ int usb_serial_generic_chars_in_buffer(struct tty_struct *tty) } EXPORT_SYMBOL_GPL(usb_serial_generic_chars_in_buffer); -static int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, - int index, gfp_t mem_flags) +int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, + int index, gfp_t mem_flags) { int res; @@ -276,6 +276,7 @@ static int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, return 0; } +EXPORT_SYMBOL_GPL(usb_serial_generic_submit_read_urb); int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, gfp_t mem_flags) diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index b9b0f7b4..a85e35b 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -337,6 +337,8 @@ extern int usb_serial_generic_get_icount(struct tty_struct *tty, struct serial_icounter_struct *icount); extern int usb_serial_generic_register(void); extern void usb_serial_generic_deregister(void); +extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, + int index, gfp_t mem_flags); extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, gfp_t mem_flags); extern void usb_serial_generic_process_read_urb(struct urb *urb); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html