]> git.karo-electronics.de Git - linux-beck.git/commitdiff
n_tty: Inline check_unthrottle() at lone call site
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 6 Mar 2013 13:20:51 +0000 (08:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:11:59 +0000 (16:11 -0700)
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>
drivers/tty/n_tty.c

index 05e72bea9b07d87e31c69e291844428cb642d4be..7fbad56db7c988a2ef93d8505da440078f44bb20 100644 (file)
@@ -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 @@ 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)