From 0897ebf941285f1db77f7d79d2b4c313db84a402 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Wed, 6 Mar 2013 08:20:51 -0500 Subject: [PATCH] --- yaml --- r: 364217 b: refs/heads/master c: c828f679eed393d6925a2b44a4c3fb80a8d657cb h: refs/heads/master i: 364215: 5a0be972042c0c996bcab88cef0b60c1bde1efcd v: v3 --- [refs] | 2 +- trunk/drivers/tty/n_tty.c | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index 899dd6413374..cba60fce35ca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: afa80ccb4c7d39702dfb0832ce02a054848191a8 +refs/heads/master: c828f679eed393d6925a2b44a4c3fb80a8d657cb diff --git a/trunk/drivers/tty/n_tty.c b/trunk/drivers/tty/n_tty.c index 05e72bea9b07..7fbad56db7c9 100644 --- a/trunk/drivers/tty/n_tty.c +++ b/trunk/drivers/tty/n_tty.c @@ -188,21 +188,6 @@ static void put_tty_queue(unsigned char c, struct n_tty_data *ldata) raw_spin_unlock_irqrestore(&ldata->read_lock, flags); } -/** - * check_unthrottle - allow new receive data - * @tty; tty device - * - * Check whether to call the driver unthrottle functions - * - * Can sleep, may be called under the atomic_read_lock mutex but - * this is not guaranteed. - */ -static void check_unthrottle(struct tty_struct *tty) -{ - if (tty->count) - tty_unthrottle(tty); -} - /** * reset_buffer_flags - reset buffer state * @tty: terminal to reset @@ -1961,7 +1946,8 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, */ if (n_tty_chars_in_buffer(tty) <= TTY_THRESHOLD_UNTHROTTLE) { n_tty_set_room(tty); - check_unthrottle(tty); + if (tty->count) + tty_unthrottle(tty); } if (b - buf >= minimum)