USB: ftdi_sio: fix chars_in_buffer overhead
authorJohan Hovold <jhovold@gmail.com>
Sun, 5 May 2013 18:32:30 +0000 (20:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2013 00:32:22 +0000 (17:32 -0700)
commita37025b5c702aaf87191cd75fcc42c54454f16f5
treea8a3c2fd4d441b7827a9912d56a15c3acaa7c105
parentc4133648bbce9e6b425a74cc890c8e4df51acaa9
USB: ftdi_sio: fix chars_in_buffer overhead

Use the new generic usb-serial wait_until_sent implementation to wait
for hardware buffers to drain.

This removes the need to check the hardware buffers in chars_in_buffer
and thus removes the overhead introduced by commit 6f602912 ("usb:
serial: ftdi_sio: Add missing chars_in_buffer function") without
breaking tty_wait_until_sent (used by, for example, tcdrain, tcsendbreak
and close).

Reported-by: Stas Sergeev <stsp@list.ru>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ftdi_sio.c