提交 8da636d9 编写于 作者: J Johan Hovold 提交者: 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: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册