diff options
Diffstat (limited to 'drivers/usb/serial/ipaq.c')
-rw-r--r-- | drivers/usb/serial/ipaq.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 06d07cea0b70..9a5c97989562 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -711,7 +711,7 @@ static void ipaq_read_bulk_callback(struct urb *urb, struct pt_regs *regs) | |||
711 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; | 711 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; |
712 | struct tty_struct *tty; | 712 | struct tty_struct *tty; |
713 | unsigned char *data = urb->transfer_buffer; | 713 | unsigned char *data = urb->transfer_buffer; |
714 | int i, result; | 714 | int result; |
715 | 715 | ||
716 | dbg("%s - port %d", __FUNCTION__, port->number); | 716 | dbg("%s - port %d", __FUNCTION__, port->number); |
717 | 717 | ||
@@ -724,14 +724,8 @@ static void ipaq_read_bulk_callback(struct urb *urb, struct pt_regs *regs) | |||
724 | 724 | ||
725 | tty = port->tty; | 725 | tty = port->tty; |
726 | if (tty && urb->actual_length) { | 726 | if (tty && urb->actual_length) { |
727 | for (i = 0; i < urb->actual_length ; ++i) { | 727 | tty_buffer_request_room(tty, urb->actual_length); |
728 | /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */ | 728 | tty_insert_flip_string(tty, data, urb->actual_length); |
729 | if(tty->flip.count >= TTY_FLIPBUF_SIZE) { | ||
730 | tty_flip_buffer_push(tty); | ||
731 | } | ||
732 | /* this doesn't actually push the data through unless tty->low_latency is set */ | ||
733 | tty_insert_flip_char(tty, data[i], 0); | ||
734 | } | ||
735 | tty_flip_buffer_push(tty); | 729 | tty_flip_buffer_push(tty); |
736 | bytes_in += urb->actual_length; | 730 | bytes_in += urb->actual_length; |
737 | } | 731 | } |