diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-07-15 20:11:34 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-07-15 20:11:34 -0600 |
commit | 8c11642a50555e584774737f7c296f9aece310cf (patch) | |
tree | 1ff8dfaf05479593ef2c50378a68dfc6aec495a5 /drivers/tty/tty_ldisc.c | |
parent | 5d10302f46df1d9a85c34ea97f9b6c29e414482e (diff) | |
parent | 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff) | |
download | blackbird-obmc-linux-8c11642a50555e584774737f7c296f9aece310cf.tar.gz blackbird-obmc-linux-8c11642a50555e584774737f7c296f9aece310cf.zip |
Merge commit 'v3.0-rc7' into devicetree/next
Diffstat (limited to 'drivers/tty/tty_ldisc.c')
-rw-r--r-- | drivers/tty/tty_ldisc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index 5d01d32e2cf0..ef925d581713 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c @@ -555,7 +555,7 @@ static void tty_ldisc_flush_works(struct tty_struct *tty) static int tty_ldisc_wait_idle(struct tty_struct *tty) { int ret; - ret = wait_event_interruptible_timeout(tty_ldisc_idle, + ret = wait_event_timeout(tty_ldisc_idle, atomic_read(&tty->ldisc->users) == 1, 5 * HZ); if (ret < 0) return ret; @@ -763,6 +763,8 @@ static int tty_ldisc_reinit(struct tty_struct *tty, int ldisc) if (IS_ERR(ld)) return -1; + WARN_ON_ONCE(tty_ldisc_wait_idle(tty)); + tty_ldisc_close(tty, tty->ldisc); tty_ldisc_put(tty->ldisc); tty->ldisc = NULL; |