From: Alan Cox Date: Thu, 1 Nov 2012 16:43:49 +0000 (+0000) Subject: moxa: dcd handling of CLOCAL is backwards X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4bd82136cdf04f3a8d50e20c1b76da750f75f2db;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49911 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 56e616b9109..9b57aae139f 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); }