diff options
Diffstat (limited to 'drivers/char/tty_port.c')
-rw-r--r-- | drivers/char/tty_port.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index 2e8552dc5eda..c63f3d33914a 100644 --- a/drivers/char/tty_port.c +++ b/drivers/char/tty_port.c | |||
@@ -219,8 +219,11 @@ int tty_port_block_til_ready(struct tty_port *port, | |||
219 | 219 | ||
220 | /* if non-blocking mode is set we can pass directly to open unless | 220 | /* if non-blocking mode is set we can pass directly to open unless |
221 | the port has just hung up or is in another error state */ | 221 | the port has just hung up or is in another error state */ |
222 | if ((filp->f_flags & O_NONBLOCK) || | 222 | if (tty->flags & (1 << TTY_IO_ERROR)) { |
223 | (tty->flags & (1 << TTY_IO_ERROR))) { | 223 | port->flags |= ASYNC_NORMAL_ACTIVE; |
224 | return 0; | ||
225 | } | ||
226 | if (filp->f_flags & O_NONBLOCK) { | ||
224 | /* Indicate we are open */ | 227 | /* Indicate we are open */ |
225 | if (tty->termios->c_cflag & CBAUD) | 228 | if (tty->termios->c_cflag & CBAUD) |
226 | tty_port_raise_dtr_rts(port); | 229 | tty_port_raise_dtr_rts(port); |