]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
moxa: dcd handling of CLOCAL is backwards
authorAlan Cox <alan@linux.intel.com>
Thu, 1 Nov 2012 16:43:49 +0000 (16:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Nov 2012 00:53:14 +0000 (16:53 -0800)
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>
drivers/tty/moxa.c

index 56e616b9109a4963eb2d78bcfdb7eed91b973f8e..9b57aae139f69d4f0bfa637549e9fd4339b002bf 100644 (file)
@@ -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);
        }