aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/generic.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 97fa3c428435..7cfce9dabb90 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)
323 room = tty_buffer_request_room(tty, urb->actual_length); 323 room = tty_buffer_request_room(tty, urb->actual_length);
324 if (room) { 324 if (room) {
325 tty_insert_flip_string(tty, urb->transfer_buffer, room); 325 tty_insert_flip_string(tty, urb->transfer_buffer, room);
326 tty_flip_buffer_push(tty); /* is this allowed from an URB callback ? */ 326 tty_flip_buffer_push(tty);
327 } 327 }
328 } 328 }
329 329
@@ -349,10 +349,12 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb)
349 349
350 /* Throttle the device if requested by tty */ 350 /* Throttle the device if requested by tty */
351 spin_lock_irqsave(&port->lock, flags); 351 spin_lock_irqsave(&port->lock, flags);
352 if (!(port->throttled = port->throttle_req)) 352 if (!(port->throttled = port->throttle_req)) {
353 /* Handle data and continue reading from device */ 353 spin_unlock_irqrestore(&port->lock, flags);
354 flush_and_resubmit_read_urb(port); 354 flush_and_resubmit_read_urb(port);
355 spin_unlock_irqrestore(&port->lock, flags); 355 } else {
356 spin_unlock_irqrestore(&port->lock, flags);
357 }
356} 358}
357EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); 359EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback);
358 360