Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alan Cox and committed by
Greg Kroah-Hartman
4bd82136 e8823f1c

+1 -1
+1 -1
drivers/tty/moxa.c
··· 1370 1370 p->DCDState = dcd; 1371 1371 spin_unlock_irqrestore(&p->port.lock, flags); 1372 1372 tty = tty_port_tty_get(&p->port); 1373 - if (tty && C_CLOCAL(tty) && !dcd) 1373 + if (tty && !C_CLOCAL(tty) && !dcd) 1374 1374 tty_hangup(tty); 1375 1375 tty_kref_put(tty); 1376 1376 }