diff options
Diffstat (limited to 'drivers/usb/serial/navman.c')
-rw-r--r-- | drivers/usb/serial/navman.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c index d6736531a0fa..bcdcbb822705 100644 --- a/drivers/usb/serial/navman.c +++ b/drivers/usb/serial/navman.c | |||
@@ -64,12 +64,13 @@ static void navman_read_int_callback(struct urb *urb) | |||
64 | usb_serial_debug_data(debug, &port->dev, __func__, | 64 | usb_serial_debug_data(debug, &port->dev, __func__, |
65 | urb->actual_length, data); | 65 | urb->actual_length, data); |
66 | 66 | ||
67 | tty = port->port.tty; | 67 | tty = tty_port_tty_get(&port->port); |
68 | if (tty && urb->actual_length) { | 68 | if (tty && urb->actual_length) { |
69 | tty_buffer_request_room(tty, urb->actual_length); | 69 | tty_buffer_request_room(tty, urb->actual_length); |
70 | tty_insert_flip_string(tty, data, urb->actual_length); | 70 | tty_insert_flip_string(tty, data, urb->actual_length); |
71 | tty_flip_buffer_push(tty); | 71 | tty_flip_buffer_push(tty); |
72 | } | 72 | } |
73 | tty_kref_put(tty); | ||
73 | 74 | ||
74 | exit: | 75 | exit: |
75 | result = usb_submit_urb(urb, GFP_ATOMIC); | 76 | result = usb_submit_urb(urb, GFP_ATOMIC); |