summary refs log tree commit diff
path: root/drivers/tty/moxa.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-11-01 16:43:49 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 16:53:14 -0800
commit4bd82136cdf04f3a8d50e20c1b76da750f75f2db (patch)
tree46d5f46dda62e80977d01c696754c899b1db3915 /drivers/tty/moxa.c
parente8823f1ca8d5a0c5d69a8862682ee8bde26990ca (diff)
downloadlinux-4bd82136cdf04f3a8d50e20c1b76da750f75f2db.tar.gz
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>
Diffstat (limited to 'drivers/tty/moxa.c')
-rw-r--r--drivers/tty/moxa.c2
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)
         	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);
 	}