diff options
Diffstat (limited to 'drivers/usb/serial/mct_u232.c')
-rw-r--r-- | drivers/usb/serial/mct_u232.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index b6911757c855..f42528e05d7b 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -531,7 +531,6 @@ static void mct_u232_read_int_callback(struct urb *urb) | |||
531 | { | 531 | { |
532 | struct usb_serial_port *port = urb->context; | 532 | struct usb_serial_port *port = urb->context; |
533 | struct mct_u232_private *priv = usb_get_serial_port_data(port); | 533 | struct mct_u232_private *priv = usb_get_serial_port_data(port); |
534 | struct tty_struct *tty; | ||
535 | unsigned char *data = urb->transfer_buffer; | 534 | unsigned char *data = urb->transfer_buffer; |
536 | int retval; | 535 | int retval; |
537 | int status = urb->status; | 536 | int status = urb->status; |
@@ -561,13 +560,9 @@ static void mct_u232_read_int_callback(struct urb *urb) | |||
561 | */ | 560 | */ |
562 | if (urb->transfer_buffer_length > 2) { | 561 | if (urb->transfer_buffer_length > 2) { |
563 | if (urb->actual_length) { | 562 | if (urb->actual_length) { |
564 | tty = tty_port_tty_get(&port->port); | 563 | tty_insert_flip_string(&port->port, data, |
565 | if (tty) { | 564 | urb->actual_length); |
566 | tty_insert_flip_string(tty, data, | 565 | tty_flip_buffer_push(&port->port); |
567 | urb->actual_length); | ||
568 | tty_flip_buffer_push(tty); | ||
569 | } | ||
570 | tty_kref_put(tty); | ||
571 | } | 566 | } |
572 | goto exit; | 567 | goto exit; |
573 | } | 568 | } |