]> git.baikalelectronics.ru Git - kernel.git/commit
serial: core: Privatize modem status enable flags
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 10 Sep 2014 19:06:24 +0000 (15:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 04:19:35 +0000 (21:19 -0700)
commitb9c4f1adf4857d82324f0ae9f2f72d769b539c5a
tree53eb54bc7cf744f3813c34c79769529d0df6c223
parent08c4e5add1fe05662cdfcb69a34188ddd305d253
serial: core: Privatize modem status enable flags

The serial core uses the tty port flags, ASYNC_CTS_FLOW and
ASYNC_CD_CHECK, to track whether CTS and DCD changes should be
ignored or handled. However, the tty port flags are not safe for
atomic bit operations and no lock provides serialized updates.

Introduce the struct uart_port status field to track CTS and DCD
enable states, and serialize access with uart port lock. Substitute
uart_cts_enabled() helper for tty_port_cts_enabled().

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mxs-auart.c
drivers/tty/serial/serial_core.c
include/linux/serial_core.h