mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
tty: Replace ASYNC_CHECK_CD and update atomically
Replace ASYNC_CHECK_CD bit in the tty_port::flags field with TTY_PORT_CHECK_CD bit in the tty_port::iflags field. Introduce helpers tty_port_set_check_carrier() and tty_port_check_carrier() to abstract the atomic bit ops. Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
807c8d81f4
commit
2d68655d15
13 changed files with 39 additions and 64 deletions
|
|
@ -1043,11 +1043,7 @@ isdn_tty_change_speed(modem_info *info)
|
|||
if (!(cflag & PARODD))
|
||||
cval |= UART_LCR_EPAR;
|
||||
|
||||
if (cflag & CLOCAL)
|
||||
port->flags &= ~ASYNC_CHECK_CD;
|
||||
else {
|
||||
port->flags |= ASYNC_CHECK_CD;
|
||||
}
|
||||
tty_port_set_check_carrier(port, ~cflag & CLOCAL);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -2526,7 +2522,7 @@ isdn_tty_modem_result(int code, modem_info *info)
|
|||
if (info->closing || (!info->port.tty))
|
||||
return;
|
||||
|
||||
if (info->port.flags & ASYNC_CHECK_CD)
|
||||
if (tty_port_check_carrier(&info->port))
|
||||
tty_hangup(info->port.tty);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue