Commit 4bd82136 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

moxa: dcd handling of CLOCAL is backwards



We should do hangup on dcd loss if CLOCAL is false not true.

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49911


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e8823f1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}