From b8a4aff8f6b03c2d8e0f192ec3cb9609bdb974e2 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 11 Jun 2009 14:33:37 +0100 Subject: [PATCH] --- yaml --- r: 146303 b: refs/heads/master c: 3e3b5c087799e536871c8261b05bc28e4783c8da h: refs/heads/master i: 146301: ec209465cf84699345077a75d03ec65d3455bf0b 146299: 2a4bc75b4afb61714c9814922c33cfe41f8668c7 146295: 4728b708221e317c490b167b31088be7dcee541b 146287: d23422e29182639568dd1519b9e46bfb7547ce98 146271: 9161beac0ccee0e3d68926f025a7097ea35e702c 146239: 9a6ab2652f54fba7d10a755272da32075f7190ca 146175: 16d1fe19991aec8a7ab16eae8e85b280c646624c v: v3 --- [refs] | 2 +- trunk/drivers/char/tty_port.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 520680b93aba..aafcf5f9048b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5fc5b42a3bb564f0b6e03f0f1b522ed9100250ad +refs/heads/master: 3e3b5c087799e536871c8261b05bc28e4783c8da diff --git a/trunk/drivers/char/tty_port.c b/trunk/drivers/char/tty_port.c index 931af1030740..62dadfc95e34 100644 --- a/trunk/drivers/char/tty_port.c +++ b/trunk/drivers/char/tty_port.c @@ -222,7 +222,6 @@ int tty_port_block_til_ready(struct tty_port *port, before the next open may complete */ retval = 0; - add_wait_queue(&port->open_wait, &wait); /* The port lock protects the port counts */ spin_lock_irqsave(&port->lock, flags); @@ -236,7 +235,7 @@ int tty_port_block_til_ready(struct tty_port *port, if (tty->termios->c_cflag & CBAUD) tty_port_raise_dtr_rts(port); - set_current_state(TASK_INTERRUPTIBLE); + prepare_to_wait(&port->open_wait, &wait, TASK_INTERRUPTIBLE); /* Check for a hangup or uninitialised port. Return accordingly */ if (tty_hung_up_p(filp) || !(port->flags & ASYNC_INITIALIZED)) { if (port->flags & ASYNC_HUP_NOTIFY) @@ -257,8 +256,7 @@ int tty_port_block_til_ready(struct tty_port *port, } schedule(); } - set_current_state(TASK_RUNNING); - remove_wait_queue(&port->open_wait, &wait); + finish_wait(&port->open_wait, &wait); /* Update counts. A parallel hangup will have set count to zero and we must not mess that up further */