Skip to content

Commit

Permalink
TTY: hvsi, CLOCAL is not in tty->flags
Browse files Browse the repository at this point in the history
It is in termios cflags. So change the test in hvsi_recv_control to do
the right thing. Previously it was actually testing TTY_LDISC_OPEN
bit, i.e. whether an ldisc is active. And yes, it is most of the time.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent 6968a75 commit 5f56605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/hvc/hvsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet,
pr_debug("hvsi%i: CD dropped\n", hp->index);
hp->mctrl &= TIOCM_CD;
/* If userland hasn't done an open(2) yet, hp->tty is NULL. */
if (hp->tty && !(hp->tty->flags & CLOCAL))
if (hp->tty && !C_CLOCAL(hp->tty))
*to_hangup = hp->tty;
}
break;
Expand Down

0 comments on commit 5f56605

Please sign in to comment.