aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r--drivers/usb/class/cdc-acm.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 248279e44c99..b9fd39fd1b5b 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -335,14 +335,9 @@ next_buffer:
335 335
336 dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d\n", buf, buf->size); 336 dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d\n", buf, buf->size);
337 337
338 for (i = 0; i < buf->size && !acm->throttle; i++) { 338 tty_buffer_request_room(tty, buf->size);
339 /* if we insert more than TTY_FLIPBUF_SIZE characters, 339 if (!acm->throttle)
340 we drop them. */ 340 tty_insert_flip_string(tty, buf->base, buf->size);
341 if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
342 tty_flip_buffer_push(tty);
343 }
344 tty_insert_flip_char(tty, buf->base[i], 0);
345 }
346 tty_flip_buffer_push(tty); 341 tty_flip_buffer_push(tty);
347 342
348 spin_lock(&acm->throttle_lock); 343 spin_lock(&acm->throttle_lock);