tty: Replace ASYNC_CTS_FLOW bit and update atomically

Replace ASYNC_CTS_FLOW bit in the tty_port::flags field with
TTY_PORT_CTS_FLOW bit in the tty_port::iflags field. Add
tty_port_set_cts_flow() helper to abstract the atomic bit ops.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Hurley
2016-04-09 17:53:21 -07:00
committed by Greg Kroah-Hartman
parent e4d38f334a
commit 5604a98e2f
10 changed files with 25 additions and 38 deletions

View File

@@ -2813,10 +2813,7 @@ static void change_params(SLMP_INFO *info)
}
info->timeout += HZ/50; /* Add .02 seconds of slop */
if (cflag & CRTSCTS)
info->port.flags |= ASYNC_CTS_FLOW;
else
info->port.flags &= ~ASYNC_CTS_FLOW;
tty_port_set_cts_flow(&info->port, cflag & CRTSCTS);
if (cflag & CLOCAL)
info->port.flags &= ~ASYNC_CHECK_CD;