}
EXPORT_SYMBOL_GPL(usb_serial_generic_submit_read_urb);
-static void usb_serial_generic_process_read_urb(struct urb *urb)
+void usb_serial_generic_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
struct tty_struct *tty;
tty_flip_buffer_push(tty);
tty_kref_put(tty);
}
+EXPORT_SYMBOL_GPL(usb_serial_generic_process_read_urb);
void usb_serial_generic_read_bulk_callback(struct urb *urb)
{
usb_serial_debug_data(debug, &port->dev, __func__,
urb->actual_length, data);
- usb_serial_generic_process_read_urb(urb);
+ port->serial->type->process_read_urb(urb);
/* Throttle the device if requested by tty */
spin_lock_irqsave(&port->lock, flags);
set_to_generic_if_null(device, write_bulk_callback);
set_to_generic_if_null(device, disconnect);
set_to_generic_if_null(device, release);
+ set_to_generic_if_null(device, process_read_urb);
}
int usb_serial_register(struct usb_serial_driver *driver)
void (*write_int_callback)(struct urb *urb);
void (*read_bulk_callback)(struct urb *urb);
void (*write_bulk_callback)(struct urb *urb);
+ /* Called by the generic read bulk callback */
+ void (*process_read_urb)(struct urb *urb);
};
#define to_usb_serial_driver(d) \
container_of(d, struct usb_serial_driver, driver)
extern void usb_serial_generic_deregister(void);
extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port,
gfp_t mem_flags);
+extern void usb_serial_generic_process_read_urb(struct urb *urb);
extern int usb_serial_handle_sysrq_char(struct tty_struct *tty,
struct usb_serial_port *port,
unsigned int ch);