diff options
Diffstat (limited to 'drivers/usb/gadget/u_serial.c')
-rw-r--r-- | drivers/usb/gadget/u_serial.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index d0f95482f40e..3560799d530a 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c @@ -495,12 +495,8 @@ static void gs_rx_push(unsigned long _port) req = list_first_entry(queue, struct usb_request, list); - /* discard data if tty was closed */ - if (!tty) - goto recycle; - /* leave data queued if tty was rx throttled */ - if (test_bit(TTY_THROTTLED, &tty->flags)) + if (tty && test_bit(TTY_THROTTLED, &tty->flags)) break; switch (req->status) { @@ -533,7 +529,8 @@ static void gs_rx_push(unsigned long _port) size -= n; } - count = tty_insert_flip_string(tty, packet, size); + count = tty_insert_flip_string(&port->port, packet, + size); if (count) do_push = true; if (count != size) { @@ -546,7 +543,7 @@ static void gs_rx_push(unsigned long _port) } port->n_read = 0; } -recycle: + list_move(&req->list, &port->read_pool); port->read_started--; } |