Commit 8da636d9 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: ftdi_sio: optimise chars_in_buffer

No need to check hardware buffers when we know that the software
buffers are non-empty.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 755b6040
......@@ -2098,6 +2098,8 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty)
int ret;
chars = usb_serial_generic_chars_in_buffer(tty);
if (chars)
return chars;
/* Check hardware buffer */
switch (priv->chip_type) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment