From 5fc5b42a3bb564f0b6e03f0f1b522ed9100250ad Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 11 Jun 2009 14:32:42 +0100 Subject: 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 Signed-off-by: Linus Torvalds --- drivers/char/tty_port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index 4d08b6d27c2..931af103074 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 -- cgit v1.2.3