diff options
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index d38a25f36ea5..31ae661e586a 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -332,9 +332,9 @@ static void acm_rx_tasklet(unsigned long _acm) | |||
332 | if (!ACM_READY(acm)) | 332 | if (!ACM_READY(acm)) |
333 | return; | 333 | return; |
334 | 334 | ||
335 | spin_lock(&acm->throttle_lock); | 335 | spin_lock_irqsave(&acm->throttle_lock, flags); |
336 | throttled = acm->throttle; | 336 | throttled = acm->throttle; |
337 | spin_unlock(&acm->throttle_lock); | 337 | spin_unlock_irqrestore(&acm->throttle_lock, flags); |
338 | if (throttled) | 338 | if (throttled) |
339 | return; | 339 | return; |
340 | 340 | ||
@@ -352,9 +352,9 @@ next_buffer: | |||
352 | dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); | 352 | dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); |
353 | 353 | ||
354 | tty_buffer_request_room(tty, buf->size); | 354 | tty_buffer_request_room(tty, buf->size); |
355 | spin_lock(&acm->throttle_lock); | 355 | spin_lock_irqsave(&acm->throttle_lock, flags); |
356 | throttled = acm->throttle; | 356 | throttled = acm->throttle; |
357 | spin_unlock(&acm->throttle_lock); | 357 | spin_unlock_irqrestore(&acm->throttle_lock, flags); |
358 | if (!throttled) | 358 | if (!throttled) |
359 | tty_insert_flip_string(tty, buf->base, buf->size); | 359 | tty_insert_flip_string(tty, buf->base, buf->size); |
360 | tty_flip_buffer_push(tty); | 360 | tty_flip_buffer_push(tty); |