diff options
Diffstat (limited to 'drivers/usb/serial/cyberjack.c')
-rw-r--r-- | drivers/usb/serial/cyberjack.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 69a4fa1cee25..629bd2894506 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -324,7 +324,6 @@ static void cyberjack_read_bulk_callback(struct urb *urb) struct usb_serial_port *port = urb->context; struct cyberjack_private *priv = usb_get_serial_port_data(port); struct device *dev = &port->dev; - struct tty_struct *tty; unsigned char *data = urb->transfer_buffer; short todo; int result; @@ -337,16 +336,10 @@ static void cyberjack_read_bulk_callback(struct urb *urb) return; } - tty = tty_port_tty_get(&port->port); - if (!tty) { - dev_dbg(dev, "%s - ignoring since device not open\n", __func__); - return; - } if (urb->actual_length) { - tty_insert_flip_string(tty, data, urb->actual_length); - tty_flip_buffer_push(tty); + tty_insert_flip_string(&port->port, data, urb->actual_length); + tty_flip_buffer_push(&port->port); } - tty_kref_put(tty); spin_lock(&priv->lock); |