diff options
Diffstat (limited to 'drivers/usb/serial/ipw.c')
-rw-r--r-- | drivers/usb/serial/ipw.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index 2dd191f5fe76..e760a70242c1 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c | |||
@@ -166,7 +166,6 @@ static void ipw_read_bulk_callback(struct urb *urb, struct pt_regs *regs) | |||
166 | struct usb_serial_port *port = urb->context; | 166 | struct usb_serial_port *port = urb->context; |
167 | unsigned char *data = urb->transfer_buffer; | 167 | unsigned char *data = urb->transfer_buffer; |
168 | struct tty_struct *tty; | 168 | struct tty_struct *tty; |
169 | int i; | ||
170 | int result; | 169 | int result; |
171 | 170 | ||
172 | dbg("%s - port %d", __FUNCTION__, port->number); | 171 | dbg("%s - port %d", __FUNCTION__, port->number); |
@@ -180,14 +179,8 @@ static void ipw_read_bulk_callback(struct urb *urb, struct pt_regs *regs) | |||
180 | 179 | ||
181 | tty = port->tty; | 180 | tty = port->tty; |
182 | if (tty && urb->actual_length) { | 181 | if (tty && urb->actual_length) { |
183 | for (i = 0; i < urb->actual_length ; ++i) { | 182 | tty_buffer_request_room(tty, urb->actual_length); |
184 | /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */ | 183 | tty_insert_flip_string(tty, data, urb->actual_length); |
185 | if(tty->flip.count >= TTY_FLIPBUF_SIZE) { | ||
186 | tty_flip_buffer_push(tty); | ||
187 | } | ||
188 | /* this doesn't actually push the data through unless tty->low_latency is set */ | ||
189 | tty_insert_flip_char(tty, data[i], 0); | ||
190 | } | ||
191 | tty_flip_buffer_push(tty); | 184 | tty_flip_buffer_push(tty); |
192 | } | 185 | } |
193 | 186 | ||