summaryrefslogtreecommitdiff
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-03-06 17:20:51 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-19 03:11:59 +0400
commitc828f679eed393d6925a2b44a4c3fb80a8d657cb (patch)
tree64327118b7021ebb04db04a25ba97d7729019dfa /drivers/tty/n_tty.c
parentafa80ccb4c7d39702dfb0832ce02a054848191a8 (diff)
downloadlinux-c828f679eed393d6925a2b44a4c3fb80a8d657cb.tar.xz
n_tty: Inline check_unthrottle() at lone call site
2-line function check_unthrottle() is now only called from n_tty_read(); merge into caller. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 05e72bea9b07..7fbad56db7c9 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -189,21 +189,6 @@ static void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
}
/**
- * 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 @@ do_it_again:
*/
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)