aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/empeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/empeg.c')
-rw-r--r--drivers/usb/serial/empeg.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 79a766e9ca23..63f7c78a1152 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -344,7 +344,6 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
344 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 344 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
345 struct tty_struct *tty; 345 struct tty_struct *tty;
346 unsigned char *data = urb->transfer_buffer; 346 unsigned char *data = urb->transfer_buffer;
347 int i;
348 int result; 347 int result;
349 348
350 dbg("%s - port %d", __FUNCTION__, port->number); 349 dbg("%s - port %d", __FUNCTION__, port->number);
@@ -359,19 +358,8 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
359 tty = port->tty; 358 tty = port->tty;
360 359
361 if (urb->actual_length) { 360 if (urb->actual_length) {
362 for (i = 0; i < urb->actual_length ; ++i) { 361 tty_buffer_request_room(tty, urb->actual_length);
363 /* gb - 2000/11/13 362 tty_insert_flip_string(tty, data, urb->actual_length);
364 * If we insert too many characters we'll overflow the buffer.
365 * This means we'll lose bytes - Decidedly bad.
366 */
367 if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
368 tty_flip_buffer_push(tty);
369 }
370 tty_insert_flip_char(tty, data[i], 0);
371 }
372 /* gb - 2000/11/13
373 * Goes straight through instead of scheduling - if tty->low_latency is set.
374 */
375 tty_flip_buffer_push(tty); 363 tty_flip_buffer_push(tty);
376 bytes_in += urb->actual_length; 364 bytes_in += urb->actual_length;
377 } 365 }