[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1244635684-8318-1-git-send-email-jirislaby@gmail.com>
Date: Wed, 10 Jun 2009 14:08:03 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: alan@...rguk.ukuu.org.uk
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Jiri Slaby <jirislaby@...il.com>
Subject: [PATCH 1/2] Char: tty, remove sleep_on
Use wait_event instead of sleep_on in tty_block_til_ready.
Wait for ASYNC_CLOSING flag being 0.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
---
drivers/char/tty_port.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 4d08b6d..931af10 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -198,7 +198,8 @@ int tty_port_block_til_ready(struct tty_port *port,
/* block if port is in the process of being closed */
if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
- interruptible_sleep_on(&port->close_wait);
+ wait_event_interruptible(port->close_wait,
+ !(port->flags & ASYNC_CLOSING));
if (port->flags & ASYNC_HUP_NOTIFY)
return -EAGAIN;
else
--
1.6.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists