diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-10 18:45:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-10 18:45:23 -0700 |
commit | 2b752acd91ecee926483b5f64a8f8bfe06e081fb (patch) | |
tree | 8cc17b38613bc75ecd18fdb4cd345a20b1644924 /drivers/usb/serial/generic.c | |
parent | f5dbb55b995b77d396fe2204495a0af3e24d28c2 (diff) | |
parent | 15c4a4e2f1337a442fe6c66266a8829afc8ff96f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB:Update mailing list information in documentation
USB: fix ehci unlink regressions
USB: new ftdi_sio device id
USB: Remove __KERNEL__ check from non-exported gadget.h.
USB: g_printer.h does not need to be "unifdef"ed.
USB: fsl_usb2_udc: fix broken Kconfig
USB: option: add novatel device ids
USB: usbaudio: handle kcalloc failure
USB: cypress_m8: add UPS Powercom (0d9f:0002)
USB: drivers/usb/storage/sddr55.c: fix uninitialized var warnings
USB: fix usb-serial generic recursive lock
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r-- | drivers/usb/serial/generic.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 97fa3c42843..7cfce9dabb9 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -323,7 +323,7 @@ static void flush_and_resubmit_read_urb (struct usb_serial_port *port) room = tty_buffer_request_room(tty, urb->actual_length); if (room) { tty_insert_flip_string(tty, urb->transfer_buffer, room); - tty_flip_buffer_push(tty); /* is this allowed from an URB callback ? */ + tty_flip_buffer_push(tty); } } @@ -349,10 +349,12 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) /* Throttle the device if requested by tty */ spin_lock_irqsave(&port->lock, flags); - if (!(port->throttled = port->throttle_req)) - /* Handle data and continue reading from device */ + if (!(port->throttled = port->throttle_req)) { + spin_unlock_irqrestore(&port->lock, flags); flush_and_resubmit_read_urb(port); - spin_unlock_irqrestore(&port->lock, flags); + } else { + spin_unlock_irqrestore(&port->lock, flags); + } } EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); |