diff options
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r-- | drivers/usb/serial/generic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 9eb4a65ee4d9..d41531139c55 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -327,6 +327,7 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) | |||
327 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; | 327 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; |
328 | unsigned char *data = urb->transfer_buffer; | 328 | unsigned char *data = urb->transfer_buffer; |
329 | int status = urb->status; | 329 | int status = urb->status; |
330 | unsigned long flags; | ||
330 | 331 | ||
331 | dbg("%s - port %d", __FUNCTION__, port->number); | 332 | dbg("%s - port %d", __FUNCTION__, port->number); |
332 | 333 | ||
@@ -339,11 +340,11 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) | |||
339 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); | 340 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); |
340 | 341 | ||
341 | /* Throttle the device if requested by tty */ | 342 | /* Throttle the device if requested by tty */ |
342 | spin_lock(&port->lock); | 343 | spin_lock_irqsave(&port->lock, flags); |
343 | if (!(port->throttled = port->throttle_req)) | 344 | if (!(port->throttled = port->throttle_req)) |
344 | /* Handle data and continue reading from device */ | 345 | /* Handle data and continue reading from device */ |
345 | flush_and_resubmit_read_urb(port); | 346 | flush_and_resubmit_read_urb(port); |
346 | spin_unlock(&port->lock); | 347 | spin_unlock_irqrestore(&port->lock, flags); |
347 | } | 348 | } |
348 | EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); | 349 | EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); |
349 | 350 | ||