aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/visor.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/visor.c')
-rw-r--r--drivers/usb/serial/visor.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 49b1fbe61f25..bce3d55affd8 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -488,7 +488,6 @@ static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
488 unsigned char *data = urb->transfer_buffer; 488 unsigned char *data = urb->transfer_buffer;
489 struct tty_struct *tty; 489 struct tty_struct *tty;
490 unsigned long flags; 490 unsigned long flags;
491 int i;
492 int throttled; 491 int throttled;
493 int result; 492 int result;
494 493
@@ -503,14 +502,8 @@ static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
503 502
504 tty = port->tty; 503 tty = port->tty;
505 if (tty && urb->actual_length) { 504 if (tty && urb->actual_length) {
506 for (i = 0; i < urb->actual_length ; ++i) { 505 tty_buffer_request_room(tty, urb->actual_length);
507 /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */ 506 tty_insert_flip_string(tty, data, urb->actual_length);
508 if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
509 tty_flip_buffer_push(tty);
510 }
511 /* this doesn't actually push the data through unless tty->low_latency is set */
512 tty_insert_flip_char(tty, data[i], 0);
513 }
514 tty_flip_buffer_push(tty); 507 tty_flip_buffer_push(tty);
515 } 508 }
516 spin_lock_irqsave(&priv->lock, flags); 509 spin_lock_irqsave(&priv->lock, flags);