diff options
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 92200f05b531..7a1cc1b04979 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -531,7 +531,17 @@ exit: | |||
531 | return -EINVAL; | 531 | return -EINVAL; |
532 | } | 532 | } |
533 | 533 | ||
534 | void usb_serial_port_softint(void *private) | 534 | /* |
535 | * We would be calling tty_wakeup here, but unfortunately some line | ||
536 | * disciplines have an annoying habit of calling tty->write from | ||
537 | * the write wakeup callback (e.g. n_hdlc.c). | ||
538 | */ | ||
539 | void usb_serial_port_softint(struct usb_serial_port *port) | ||
540 | { | ||
541 | schedule_work(&port->work); | ||
542 | } | ||
543 | |||
544 | static void usb_serial_port_work(void *private) | ||
535 | { | 545 | { |
536 | struct usb_serial_port *port = private; | 546 | struct usb_serial_port *port = private; |
537 | struct tty_struct *tty; | 547 | struct tty_struct *tty; |
@@ -794,7 +804,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
794 | port->serial = serial; | 804 | port->serial = serial; |
795 | spin_lock_init(&port->lock); | 805 | spin_lock_init(&port->lock); |
796 | mutex_init(&port->mutex); | 806 | mutex_init(&port->mutex); |
797 | INIT_WORK(&port->work, usb_serial_port_softint, port); | 807 | INIT_WORK(&port->work, usb_serial_port_work, port); |
798 | serial->port[i] = port; | 808 | serial->port[i] = port; |
799 | } | 809 | } |
800 | 810 | ||