Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175344
b: refs/heads/master
c: d74e828
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 8f53eb3 commit 12b6684
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 8f1e672344c39465b58cf3ffcf348afb2539ced9
refs/heads/master: d74e8286885ac9f3ccc5e2dc2301f21bbec90f7b
6 changes: 5 additions & 1 deletion trunk/drivers/char/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ void tty_port_hangup(struct tty_port *port)
spin_lock_irqsave(&port->lock, flags);
port->count = 0;
port->flags &= ~ASYNC_NORMAL_ACTIVE;
if (port->tty)
if (port->tty) {
set_bit(TTY_IO_ERROR, &port->tty->flags);
tty_kref_put(port->tty);
}
port->tty = NULL;
spin_unlock_irqrestore(&port->lock, flags);
wake_up_interruptible(&port->open_wait);
Expand Down Expand Up @@ -383,6 +385,7 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty,
if (tty_port_close_start(port, tty, filp) == 0)
return;
tty_port_shutdown(port);
set_bit(TTY_IO_ERROR, &tty->flags);
tty_port_close_end(port, tty);
tty_port_tty_set(port, NULL);
}
Expand Down Expand Up @@ -414,6 +417,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty,
}
}
set_bit(ASYNCB_INITIALIZED, &port->flags);
clear_bit(TTY_IO_ERROR, &tty->flags);
}
mutex_unlock(&port->mutex);
return tty_port_block_til_ready(port, tty, filp);
Expand Down

0 comments on commit 12b6684

Please sign in to comment.