tty: make receive_buf() return the amout of bytes received
authorFelipe Balbi <balbi@ti.com>
Mon, 21 Mar 2011 10:25:08 +0000 (12:25 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 23 Apr 2011 00:31:53 +0000 (17:31 -0700)
commitb1c43f82c5aa265442f82dba31ce985ebb7aa71c
tree8b344d8d5355b30e8deff901180edc708a653227
parente9a470f445271eb157ee860a93b062324402fc3a
tty: make receive_buf() return the amout of bytes received

it makes it simpler to keep track of the amount of
bytes received and simplifies how flush_to_ldisc counts
the remaining bytes. It also fixes a bug of lost bytes
on n_tty when flushing too many bytes via the USB
serial gadget driver.

Tested-by: Stefan Bigler <stefan.bigler@keymile.com>
Tested-by: Toby Gray <toby.gray@realvnc.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20 files changed:
drivers/bluetooth/hci_ldisc.c
drivers/input/serio/serport.c
drivers/isdn/gigaset/ser-gigaset.c
drivers/misc/ti-st/st_core.c
drivers/net/caif/caif_serial.c
drivers/net/can/slcan.c
drivers/net/hamradio/6pack.c
drivers/net/hamradio/mkiss.c
drivers/net/irda/irtty-sir.c
drivers/net/ppp_async.c
drivers/net/ppp_synctty.c
drivers/net/slip.c
drivers/net/wan/x25_asy.c
drivers/tty/n_gsm.c
drivers/tty/n_hdlc.c
drivers/tty/n_r3964.c
drivers/tty/n_tty.c
drivers/tty/tty_buffer.c
drivers/tty/vt/selection.c
include/linux/tty_ldisc.h