diff options
Diffstat (limited to 'drivers/usb/serial/kl5kusb105.c')
-rw-r--r-- | drivers/usb/serial/kl5kusb105.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 4e2f7dfb58b2..78335a5f7743 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c | |||
@@ -648,7 +648,6 @@ static void klsi_105_read_bulk_callback (struct urb *urb, struct pt_regs *regs) | |||
648 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, | 648 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, |
649 | urb->actual_length, data); | 649 | urb->actual_length, data); |
650 | } else { | 650 | } else { |
651 | int i; | ||
652 | int bytes_sent = ((__u8 *) data)[0] + | 651 | int bytes_sent = ((__u8 *) data)[0] + |
653 | ((unsigned int) ((__u8 *) data)[1] << 8); | 652 | ((unsigned int) ((__u8 *) data)[1] << 8); |
654 | tty = port->tty; | 653 | tty = port->tty; |
@@ -669,16 +668,8 @@ static void klsi_105_read_bulk_callback (struct urb *urb, struct pt_regs *regs) | |||
669 | bytes_sent = urb->actual_length - 2; | 668 | bytes_sent = urb->actual_length - 2; |
670 | } | 669 | } |
671 | 670 | ||
672 | for (i = 2; i < 2+bytes_sent; i++) { | 671 | tty_buffer_request_room(tty, bytes_sent); |
673 | /* if we insert more than TTY_FLIPBUF_SIZE characters, | 672 | tty_insert_flip_string(tty, data + 2, bytes_sent); |
674 | * we drop them. */ | ||
675 | if(tty->flip.count >= TTY_FLIPBUF_SIZE) { | ||
676 | tty_flip_buffer_push(tty); | ||
677 | } | ||
678 | /* this doesn't actually push the data through unless | ||
679 | * tty->low_latency is set */ | ||
680 | tty_insert_flip_char(tty, ((__u8*) data)[i], 0); | ||
681 | } | ||
682 | tty_flip_buffer_push(tty); | 673 | tty_flip_buffer_push(tty); |
683 | 674 | ||
684 | /* again lockless, but debug info only */ | 675 | /* again lockless, but debug info only */ |