]> git.baikalelectronics.ru Git - kernel.git/commit
n_tty: Remove overflow tests from receive_buf() path
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 24 Jul 2013 12:29:54 +0000 (08:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jul 2013 16:28:52 +0000 (09:28 -0700)
commita4f26c7f00fb8ec3a26dbeaff1369069a679c9f3
tree4aabbdd03f991b642d0c08afe9d7b3284b6fb1d6
parent6e6407fcb53a09e7f5655deaa4b8fa97c9c06830
n_tty: Remove overflow tests from receive_buf() path

Always pre-figure the space available in the read_buf and limit
the inbound receive request to that amount.

For compatibility reasons with the non-flow-controlled interface,
n_tty_receive_buf() will continue filling read_buf until all data
has been received or receive_room() returns 0.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c