summaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia/synclink_cs.c
diff options
context:
space:
mode:
authorPeter Hurley2016-04-10 02:53:23 +0200
committerGreg Kroah-Hartman2016-04-30 18:26:55 +0200
commit2d68655d15bc99981394f7caa769a14b03cac131 (patch)
treea61f1f9ffe92c21ff69fdd3f09c8f921f0670fcf /drivers/char/pcmcia/synclink_cs.c
parenttty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically (diff)
downloadkernel-qcow2-linux-2d68655d15bc99981394f7caa769a14b03cac131.tar.gz
kernel-qcow2-linux-2d68655d15bc99981394f7caa769a14b03cac131.tar.xz
kernel-qcow2-linux-2d68655d15bc99981394f7caa769a14b03cac131.zip
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/char/pcmcia/synclink_cs.c')
-rw-r--r--drivers/char/pcmcia/synclink_cs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index bdf41ac613dc..bf54f4e23b6f 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -1101,7 +1101,7 @@ static void dcd_change(MGSLPC_INFO *info, struct tty_struct *tty)
wake_up_interruptible(&info->status_event_wait_q);
wake_up_interruptible(&info->event_wait_q);
- if (info->port.flags & ASYNC_CHECK_CD) {
+ if (tty_port_check_carrier(&info->port)) {
if (debug_level >= DEBUG_LEVEL_ISR)
printk("%s CD now %s...", info->device_name,
(info->serial_signals & SerialSignal_DCD) ? "on" : "off");
@@ -1467,11 +1467,7 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty)
info->timeout += HZ/50; /* Add .02 seconds of slop */
tty_port_set_cts_flow(&info->port, cflag & CRTSCTS);
-
- if (cflag & CLOCAL)
- info->port.flags &= ~ASYNC_CHECK_CD;
- else
- info->port.flags |= ASYNC_CHECK_CD;
+ tty_port_set_check_carrier(&info->port, ~cflag & CLOCAL);
/* process tty input control flags */