linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] n_tty: Inline check_unthrottle() at lone call site
@ 2013-03-06 13:20 Peter Hurley
  2013-03-06 13:20 ` [PATCH 2/3] tty: Add safe tty throttle/unthrottle functions Peter Hurley
  2013-03-06 13:20 ` [PATCH 3/3] n_tty: Fix stuck throttled driver Peter Hurley
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Hurley @ 2013-03-06 13:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, linux-kernel, linux-serial, Vincent Pillet,
	Peter Hurley

2-line function check_unthrottle() is now only called from
n_tty_read(); merge into caller.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/tty/n_tty.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 66ce178..8f9f665 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -195,21 +195,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
  *
@@ -1971,7 +1956,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)
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-15 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06 13:20 [PATCH 1/3] n_tty: Inline check_unthrottle() at lone call site Peter Hurley
2013-03-06 13:20 ` [PATCH 2/3] tty: Add safe tty throttle/unthrottle functions Peter Hurley
2013-04-15 15:06   ` [PATCH tty-next] tty: Fix unsafe bit ops in tty_throttle_safe/unthrottle_safe Peter Hurley
2013-03-06 13:20 ` [PATCH 3/3] n_tty: Fix stuck throttled driver Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).