* [PATCH] moxa: dcd handling of CLOCAL is backwards
@ 2012-11-20 16:29 Alan Cox
0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2012-11-20 16:29 UTC (permalink / raw)
To: greg, linux-serial
From: Alan Cox <alan@linux.intel.com>
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
---
drivers/tty/moxa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 56e616b..9b57aae 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)
p->DCDState = dcd;
spin_unlock_irqrestore(&p->port.lock, flags);
tty = tty_port_tty_get(&p->port);
- if (tty && C_CLOCAL(tty) && !dcd)
+ if (tty && !C_CLOCAL(tty) && !dcd)
tty_hangup(tty);
tty_kref_put(tty);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-20 16:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-20 16:29 [PATCH] moxa: dcd handling of CLOCAL is backwards Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).