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>
Showing
- drivers/isdn/i4l/isdn_tty.c 9 additions, 11 deletionsdrivers/isdn/i4l/isdn_tty.c
- drivers/tty/amiserial.c 1 addition, 1 deletiondrivers/tty/amiserial.c
- drivers/tty/rocket.c 3 additions, 2 deletionsdrivers/tty/rocket.c
- drivers/tty/serial/crisv10.c 4 additions, 4 deletionsdrivers/tty/serial/crisv10.c
- drivers/tty/serial/serial_core.c 4 additions, 4 deletionsdrivers/tty/serial/serial_core.c
- drivers/tty/synclink.c 3 additions, 3 deletionsdrivers/tty/synclink.c
- drivers/tty/synclink_gt.c 3 additions, 3 deletionsdrivers/tty/synclink_gt.c
- drivers/tty/synclinkmp.c 3 additions, 3 deletionsdrivers/tty/synclinkmp.c
- drivers/tty/tty_port.c 6 additions, 6 deletionsdrivers/tty/tty_port.c
- include/linux/tty.h 12 additions, 0 deletionsinclude/linux/tty.h
- net/irda/ircomm/ircomm_tty.c 5 additions, 5 deletionsnet/irda/ircomm/ircomm_tty.c
Loading
Please register or sign in to comment