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 <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Este commit está contenido en:

cometido por
Greg Kroah-Hartman

padre
807c8d81f4
commit
2d68655d15
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Referencia en una nueva incidencia
Block a user