Skip to content

Commit

Permalink
tty: remove sleep_on
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Jun 11, 2009

Unverified

No user is associated with the committer email.
1 parent 4db2299 commit 5fc5b42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/tty_port.c
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5fc5b42

Please sign in to comment.