tty: remove sleep_on
authorJiri Slaby <jirislaby@gmail.com>
Thu, 11 Jun 2009 13:32:42 +0000 (14:32 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jun 2009 15:51:07 +0000 (08:51 -0700)
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>
drivers/char/tty_port.c

index 4d08b6d27c28b5f81589367c9d810bc33c53bd36..931af10307409dd6a02c99e5a2b32a3aeabbf56d 100644 (file)
@@ -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