diff options
Diffstat (limited to 'drivers/usb/serial/aircable.c')
-rw-r--r-- | drivers/usb/serial/aircable.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index 3bb1f8f11fc8..6e320cec397d 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c | |||
@@ -140,16 +140,11 @@ static void aircable_process_read_urb(struct urb *urb) | |||
140 | { | 140 | { |
141 | struct usb_serial_port *port = urb->context; | 141 | struct usb_serial_port *port = urb->context; |
142 | char *data = (char *)urb->transfer_buffer; | 142 | char *data = (char *)urb->transfer_buffer; |
143 | struct tty_struct *tty; | ||
144 | int has_headers; | 143 | int has_headers; |
145 | int count; | 144 | int count; |
146 | int len; | 145 | int len; |
147 | int i; | 146 | int i; |
148 | 147 | ||
149 | tty = tty_port_tty_get(&port->port); | ||
150 | if (!tty) | ||
151 | return; | ||
152 | |||
153 | has_headers = (urb->actual_length > 2 && data[0] == RX_HEADER_0); | 148 | has_headers = (urb->actual_length > 2 && data[0] == RX_HEADER_0); |
154 | 149 | ||
155 | count = 0; | 150 | count = 0; |
@@ -160,8 +155,7 @@ static void aircable_process_read_urb(struct urb *urb) | |||
160 | } | 155 | } |
161 | 156 | ||
162 | if (count) | 157 | if (count) |
163 | tty_flip_buffer_push(tty); | 158 | tty_flip_buffer_push(&port->port); |
164 | tty_kref_put(tty); | ||
165 | } | 159 | } |
166 | 160 | ||
167 | static struct usb_serial_driver aircable_device = { | 161 | static struct usb_serial_driver aircable_device = { |