diff options
author | Alan Cox <alan@linux.intel.com> | 2012-11-01 12:43:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-15 19:53:14 -0500 |
commit | 4bd82136cdf04f3a8d50e20c1b76da750f75f2db (patch) | |
tree | 46d5f46dda62e80977d01c696754c899b1db3915 | |
parent | e8823f1ca8d5a0c5d69a8862682ee8bde26990ca (diff) |
moxa: dcd handling of CLOCAL is backwards
We should do hangup on dcd loss if CLOCAL is false not true.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49911
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/moxa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 56e616b9109a..9b57aae139f6 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c | |||
@@ -1370,7 +1370,7 @@ static void moxa_new_dcdstate(struct moxa_port *p, u8 dcd) | |||
1370 | p->DCDState = dcd; | 1370 | p->DCDState = dcd; |
1371 | spin_unlock_irqrestore(&p->port.lock, flags); | 1371 | spin_unlock_irqrestore(&p->port.lock, flags); |
1372 | tty = tty_port_tty_get(&p->port); | 1372 | tty = tty_port_tty_get(&p->port); |
1373 | if (tty && C_CLOCAL(tty) && !dcd) | 1373 | if (tty && !C_CLOCAL(tty) && !dcd) |
1374 | tty_hangup(tty); | 1374 | tty_hangup(tty); |
1375 | tty_kref_put(tty); | 1375 | tty_kref_put(tty); |
1376 | } | 1376 | } |