X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fempeg.c;h=63f7c78a1152d05924711628be6c2e93b70ef555;hb=33f0f88f1c51ae5c2d593d26960c760ea154c2e2;hp=79a766e9ca23170160c69f182f1cd69e28d313c2;hpb=6ed80991a2dce4afc113be35089c564d62fa1f11;p=pandora-kernel.git 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) struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct tty_struct *tty; unsigned char *data = urb->transfer_buffer; - int i; int result; dbg("%s - port %d", __FUNCTION__, port->number); @@ -359,19 +358,8 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs) tty = port->tty; if (urb->actual_length) { - for (i = 0; i < urb->actual_length ; ++i) { - /* gb - 2000/11/13 - * If we insert too many characters we'll overflow the buffer. - * This means we'll lose bytes - Decidedly bad. - */ - if(tty->flip.count >= TTY_FLIPBUF_SIZE) { - tty_flip_buffer_push(tty); - } - tty_insert_flip_char(tty, data[i], 0); - } - /* gb - 2000/11/13 - * Goes straight through instead of scheduling - if tty->low_latency is set. - */ + tty_buffer_request_room(tty, urb->actual_length); + tty_insert_flip_string(tty, data, urb->actual_length); tty_flip_buffer_push(tty); bytes_in += urb->actual_length; }