aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cyberjack.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/cyberjack.c')
-rw-r--r--drivers/usb/serial/cyberjack.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 6d18d4eaba35..2357b1d102d7 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -364,7 +364,6 @@ static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
364 struct tty_struct *tty; 364 struct tty_struct *tty;
365 unsigned char *data = urb->transfer_buffer; 365 unsigned char *data = urb->transfer_buffer;
366 short todo; 366 short todo;
367 int i;
368 int result; 367 int result;
369 368
370 dbg("%s - port %d", __FUNCTION__, port->number); 369 dbg("%s - port %d", __FUNCTION__, port->number);
@@ -381,14 +380,8 @@ static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
381 return; 380 return;
382 } 381 }
383 if (urb->actual_length) { 382 if (urb->actual_length) {
384 for (i = 0; i < urb->actual_length ; ++i) { 383 tty_buffer_request_room(tty, urb->actual_length);
385 /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */ 384 tty_insert_flip_string(tty, data, urb->actual_length);
386 if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
387 tty_flip_buffer_push(tty);
388 }
389 /* this doesn't actually push the data through unless tty->low_latency is set */
390 tty_insert_flip_char(tty, data[i], 0);
391 }
392 tty_flip_buffer_push(tty); 385 tty_flip_buffer_push(tty);
393 } 386 }
394 387