diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index d4b14c30794e2ec78c6f83c57376a17f4e4fdda7..7efabc4673b6a79d8822264a02a4c8afd09a91d8 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -262,7 +262,7 @@ static void n_tty_check_throttle(struct tty_struct *tty) while (1) { int throttled; tty_set_flow_change(tty, TTY_THROTTLE_SAFE); - if (receive_room(tty) >= TTY_THRESHOLD_THROTTLE) + if (N_TTY_BUF_SIZE - read_cnt(ldata) >= TTY_THRESHOLD_THROTTLE) break; throttled = tty_throttle_safe(tty); if (!throttled)