Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146303
b: refs/heads/master
c: 3e3b5c0
h: refs/heads/master
i:
  146301: ec20946
  146299: 2a4bc75
  146295: 4728b70
  146287: d23422e
  146271: 9161bea
  146239: 9a6ab26
  146175: 16d1fe1
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Jun 11, 2009
1 parent c279e3c commit b8a4aff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fc5b42a3bb564f0b6e03f0f1b522ed9100250ad
refs/heads/master: 3e3b5c087799e536871c8261b05bc28e4783c8da
6 changes: 2 additions & 4 deletions trunk/drivers/char/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand All @@ -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 */
Expand Down

0 comments on commit b8a4aff

Please sign in to comment.