]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Apr 2016 00:53:22 +0000 (17:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 16:26:55 +0000 (09:26 -0700)
commitc5166664b2b3f6f88a4b35c60f67160d0d9f1994
tree83402ad7f36b135d15d1aa6686ff26aa186b3dec
parent1abcd5e2519045eb5d05ccc22b63bb585a39e770
tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically

Replace ASYNC_NORMAL_ACTIVE bit in the tty_port::flags field with
TTY_PORT_ACTIVE bit in the tty_port::iflags field. Introduce helpers
tty_port_set_active() and tty_port_active() to abstract atomic bit ops.

Extract state changes from port lock sections, as this usage is
broken and confused; the state transitions are protected by the
tty lock (which mutually excludes parallel open/close/hangup),
and no user tests the active state while holding the port lock.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/isdn/i4l/isdn_tty.c
drivers/tty/amiserial.c
drivers/tty/rocket.c
drivers/tty/serial/crisv10.c
drivers/tty/serial/serial_core.c
drivers/tty/synclink.c
drivers/tty/synclink_gt.c
drivers/tty/synclinkmp.c
drivers/tty/tty_port.c
include/linux/tty.h
net/irda/ircomm/ircomm_tty.c