mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
TTY: ldisc, move wait idle to caller
It is the only place where reinit is called from. And we really need to wait for the old ldisc to go once. Actually this is the place where the waiting originally was (before removed and re-added later). This will make the fix in the following patch easier to implement. Signed-off-by: Jiri Slaby <[email protected]> Cc: Dave Young <[email protected]> Cc: Dave Jones <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Dmitriy Matrosov <[email protected]> Cc: Alan Cox <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
df92d0561d
commit
300420722e
1 changed files with 2 additions and 2 deletions
|
|
@ -763,8 +763,6 @@ 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, 5 * HZ));
|
||||
|
||||
tty_ldisc_close(tty, tty->ldisc);
|
||||
tty_ldisc_put(tty->ldisc);
|
||||
tty->ldisc = NULL;
|
||||
|
|
@ -848,6 +846,8 @@ void tty_ldisc_hangup(struct tty_struct *tty)
|
|||
it means auditing a lot of other paths so this is
|
||||
a FIXME */
|
||||
if (tty->ldisc) { /* Not yet closed */
|
||||
WARN_ON_ONCE(tty_ldisc_wait_idle(tty, 5 * HZ));
|
||||
|
||||
if (reset == 0) {
|
||||
|
||||
if (!tty_ldisc_reinit(tty, tty->termios->c_line))
|
||||
|
|
|
|||
Loading…
Reference in a new issue