projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
755b604
)
USB: ftdi_sio: optimise chars_in_buffer
author
Johan Hovold
<jhovold@gmail.com>
Mon, 29 Oct 2012 09:56:27 +0000
(10:56 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 30 Oct 2012 20:19:32 +0000
(13:19 -0700)
No need to check hardware buffers when we know that the software
buffers are non-empty.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ftdi_sio.c
patch
|
blob
|
history
diff --git
a/drivers/usb/serial/ftdi_sio.c
b/drivers/usb/serial/ftdi_sio.c
index 9fe3a2e965adebbfba6074d21f2a253899f33aaf..b8bc9d0cb127f8c467698a9bc83a0602e66a8d8d 100644
(file)
--- a/
drivers/usb/serial/ftdi_sio.c
+++ b/
drivers/usb/serial/ftdi_sio.c
@@
-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) {