aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r--drivers/usb/serial/generic.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 4ddac620fc0c..476cda107f4f 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -254,7 +254,6 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *reg
254 struct usb_serial *serial = port->serial; 254 struct usb_serial *serial = port->serial;
255 struct tty_struct *tty; 255 struct tty_struct *tty;
256 unsigned char *data = urb->transfer_buffer; 256 unsigned char *data = urb->transfer_buffer;
257 int i;
258 int result; 257 int result;
259 258
260 dbg("%s - port %d", __FUNCTION__, port->number); 259 dbg("%s - port %d", __FUNCTION__, port->number);
@@ -268,14 +267,8 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *reg
268 267
269 tty = port->tty; 268 tty = port->tty;
270 if (tty && urb->actual_length) { 269 if (tty && urb->actual_length) {
271 for (i = 0; i < urb->actual_length ; ++i) { 270 tty_buffer_request_room(tty, urb->actual_length);
272 /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */ 271 tty_insert_flip_string(tty, data, urb->actual_length);
273 if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
274 tty_flip_buffer_push(tty);
275 }
276 /* this doesn't actually push the data through unless tty->low_latency is set */
277 tty_insert_flip_char(tty, data[i], 0);
278 }
279 tty_flip_buffer_push(tty); 272 tty_flip_buffer_push(tty);
280 } 273 }
281 274