summaryrefslogtreecommitdiff
path: root/drivers/tty/isicom.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-04-10 03:53:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-30 19:26:55 +0300
commit2d68655d15bc99981394f7caa769a14b03cac131 (patch)
treea61f1f9ffe92c21ff69fdd3f09c8f921f0670fcf /drivers/tty/isicom.c
parent807c8d81f4ec441241cafa3034c58df721fee869 (diff)
downloadlinux-2d68655d15bc99981394f7caa769a14b03cac131.tar.xz
tty: Replace ASYNC_CHECK_CD and update atomically
Replace ASYNC_CHECK_CD bit in the tty_port::flags field with TTY_PORT_CHECK_CD bit in the tty_port::iflags field. Introduce helpers tty_port_set_check_carrier() and tty_port_check_carrier() to abstract the atomic bit ops. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/isicom.c')
-rw-r--r--drivers/tty/isicom.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index c5f06b54b9ca..0b2bae1b2d55 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -577,7 +577,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
header = inw(base);
switch (header & 0xff) {
case 0: /* Change in EIA signals */
- if (port->port.flags & ASYNC_CHECK_CD) {
+ if (tty_port_check_carrier(&port->port)) {
if (port->status & ISI_DCD) {
if (!(header & ISI_DCD)) {
/* Carrier has been lost */
@@ -758,10 +758,7 @@ static void isicom_config_port(struct tty_struct *tty)
outw(channel_setup, base);
InterruptTheCard(base);
}
- if (C_CLOCAL(tty))
- port->port.flags &= ~ASYNC_CHECK_CD;
- else
- port->port.flags |= ASYNC_CHECK_CD;
+ tty_port_set_check_carrier(&port->port, !C_CLOCAL(tty));
/* flow control settings ...*/
flow_ctrl = 0;