aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_port.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-06-11 09:32:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 11:51:07 -0400
commit5fc5b42a3bb564f0b6e03f0f1b522ed9100250ad (patch)
tree0dfae1d81c8cba5f1cb7a3cb32cd8d5fb089db78 /drivers/char/tty_port.c
parent4db2299da213d1ba8cf7f4c0a197ae7ba49db5cb (diff)
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@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/tty_port.c')
-rw-r--r--drivers/char/tty_port.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 4d08b6d27c28..931af1030740 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,
198 198
199 /* block if port is in the process of being closed */ 199 /* block if port is in the process of being closed */
200 if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) { 200 if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
201 interruptible_sleep_on(&port->close_wait); 201 wait_event_interruptible(port->close_wait,
202 !(port->flags & ASYNC_CLOSING));
202 if (port->flags & ASYNC_HUP_NOTIFY) 203 if (port->flags & ASYNC_HUP_NOTIFY)
203 return -EAGAIN; 204 return -EAGAIN;
204 else 205 else