tty: Replace ASYNC_INITIALIZED bit and update atomically
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Apr 2016 00:53:25 +0000 (17:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 16:26:55 +0000 (09:26 -0700)
commitd41861ca19c9e96f12a4f1ebbc8255d00909a232
tree4b09c15500d404b0b375469dd673f0bc8fd05f5f
parent80f02d5424301bf4df195d09b1a664f394435851
tty: Replace ASYNC_INITIALIZED bit and update atomically

Replace ASYNC_INITIALIZED bit in the tty_port::flags field with
TTY_PORT_INITIALIZED bit in the tty_port::iflags field. Introduce helpers
tty_port_set_initialized() and tty_port_initialized() to abstract
atomic bit ops.

Note: the transforms for test_and_set_bit() and test_and_clear_bit()
are unnecessary as the state transitions are already mutually exclusive;
the tty lock prevents concurrent open/close/hangup.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 files changed:
drivers/char/pcmcia/synclink_cs.c
drivers/ipack/devices/ipoctal.c
drivers/isdn/i4l/isdn_tty.c
drivers/s390/char/con3215.c
drivers/tty/amiserial.c
drivers/tty/cyclades.c
drivers/tty/isicom.c
drivers/tty/moxa.c
drivers/tty/mxser.c
drivers/tty/n_gsm.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
drivers/usb/class/cdc-acm.c
drivers/usb/serial/console.c
drivers/usb/serial/generic.c
drivers/usb/serial/mxuport.c
drivers/usb/serial/sierra.c
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb_wwan.c
include/linux/tty.h
net/irda/ircomm/ircomm_tty.c
net/irda/ircomm/ircomm_tty_ioctl.c