mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
tty: Replace TTY_THROTTLED bit tests with tty_throttled()
Abstract TTY_THROTTLED bit tests with tty_throttled(). Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
18900ca65a
commit
97ef38b821
21 changed files with 27 additions and 23 deletions
|
|
@ -512,7 +512,7 @@ static void gs_rx_push(unsigned long _port)
|
|||
req = list_first_entry(queue, struct usb_request, list);
|
||||
|
||||
/* leave data queued if tty was rx throttled */
|
||||
if (tty && test_bit(TTY_THROTTLED, &tty->flags))
|
||||
if (tty && tty_throttled(tty))
|
||||
break;
|
||||
|
||||
switch (req->status) {
|
||||
|
|
@ -579,7 +579,7 @@ static void gs_rx_push(unsigned long _port)
|
|||
* from starving ... but it's not clear that case ever happens.
|
||||
*/
|
||||
if (!list_empty(queue) && tty) {
|
||||
if (!test_bit(TTY_THROTTLED, &tty->flags)) {
|
||||
if (!tty_throttled(tty)) {
|
||||
if (do_push)
|
||||
tasklet_schedule(&port->push);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -699,8 +699,7 @@ static void digi_set_termios(struct tty_struct *tty,
|
|||
/* don't set RTS if using hardware flow control */
|
||||
/* and throttling input */
|
||||
modem_signals = TIOCM_DTR;
|
||||
if (!C_CRTSCTS(tty) ||
|
||||
!test_bit(TTY_THROTTLED, &tty->flags))
|
||||
if (!C_CRTSCTS(tty) || !tty_throttled(tty))
|
||||
modem_signals |= TIOCM_RTS;
|
||||
digi_set_modem_signals(port, modem_signals, 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue