USB: serial: fix generic chars_in_buffer
commit30af7fb5a40f8724c130428473edffa73170e04c
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Mar 2010 22:00:42 +0000 (17 23:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:33 +0000 (20 13:21 -0700)
tree07c8fcd3493a06f67dc2b7b0aea4b48152dc2fa3
parent7919c2fd9e07276403b9a4d9ae52305e0d70f923
USB: serial: fix generic chars_in_buffer

Make sure chars_in_buffer accounts also for data in host stack queues.

This fixes the problem with tty_wait_until_sent returning too soon at
close which could cause the final write urb to be cancelled.

Reported-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/generic.c