aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r--drivers/usb/serial/option.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 3fd2405304fd..52bdf6fe46f2 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -321,7 +321,7 @@ static int option_write(struct usb_serial_port *port,
321 321
322static void option_indat_callback(struct urb *urb, struct pt_regs *regs) 322static void option_indat_callback(struct urb *urb, struct pt_regs *regs)
323{ 323{
324 int i, err; 324 int err;
325 int endpoint; 325 int endpoint;
326 struct usb_serial_port *port; 326 struct usb_serial_port *port;
327 struct tty_struct *tty; 327 struct tty_struct *tty;
@@ -338,11 +338,8 @@ static void option_indat_callback(struct urb *urb, struct pt_regs *regs)
338 } else { 338 } else {
339 tty = port->tty; 339 tty = port->tty;
340 if (urb->actual_length) { 340 if (urb->actual_length) {
341 for (i = 0; i < urb->actual_length ; ++i) { 341 tty_buffer_request_room(tty, urb->actual_length);
342 if (tty->flip.count >= TTY_FLIPBUF_SIZE) 342 tty_insert_flip_string(tty, data, urb->actual_length);
343 tty_flip_buffer_push(tty);
344 tty_insert_flip_char(tty, data[i], 0);
345 }
346 tty_flip_buffer_push(tty); 343 tty_flip_buffer_push(tty);
347 } else { 344 } else {
348 dbg("%s: empty read urb received", __FUNCTION__); 345 dbg("%s: empty read urb received", __FUNCTION__);