diff options
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 60024190136..54adc9125e5 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -772,7 +772,6 @@ static void pl2303_process_read_urb(struct urb *urb) { struct usb_serial_port *port = urb->context; struct pl2303_private *priv = usb_get_serial_port_data(port); - struct tty_struct *tty; unsigned char *data = urb->transfer_buffer; char tty_flag = TTY_NORMAL; unsigned long flags; @@ -789,10 +788,6 @@ static void pl2303_process_read_urb(struct urb *urb) if (!urb->actual_length) return; - tty = tty_port_tty_get(&port->port); - if (!tty) - return; - /* break takes precedence over parity, */ /* which takes precedence over framing errors */ if (line_status & UART_BREAK_ERROR) @@ -805,19 +800,19 @@ static void pl2303_process_read_urb(struct urb *urb) /* overrun is special, not associated with a char */ if (line_status & UART_OVERRUN_ERROR) - tty_insert_flip_char(tty, 0, TTY_OVERRUN); + tty_insert_flip_char(&port->port, 0, TTY_OVERRUN); if (port->port.console && port->sysrq) { for (i = 0; i < urb->actual_length; ++i) if (!usb_serial_handle_sysrq_char(port, data[i])) - tty_insert_flip_char(tty, data[i], tty_flag); + tty_insert_flip_char(&port->port, data[i], + tty_flag); } else { - tty_insert_flip_string_fixed_flag(tty, data, tty_flag, + tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag, urb->actual_length); } - tty_flip_buffer_push(tty); - tty_kref_put(tty); + tty_flip_buffer_push(&port->port); } /* All of the device info needed for the PL2303 SIO serial converter */ |