tty: Replace TTY_IO_ERROR bit tests with tty_io_error()
Abstract TTY_IO_ERROR status test treewide with tty_io_error(). NB: tty->flags uses atomic bit ops; replace non-atomic bit test with test_bit(). 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
1aabf523a2
commit
18900ca65a
@@ -280,7 +280,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
|
||||
* If non-blocking mode is set, or the port is not enabled,
|
||||
* then make the check up front and then exit.
|
||||
*/
|
||||
if (test_bit(TTY_IO_ERROR, &tty->flags)) {
|
||||
if (tty_io_error(tty)) {
|
||||
port->flags |= ASYNC_NORMAL_ACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -190,7 +190,7 @@ int ircomm_tty_tiocmget(struct tty_struct *tty)
|
||||
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
|
||||
unsigned int result;
|
||||
|
||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
|
||||
result = ((self->settings.dte & IRCOMM_RTS) ? TIOCM_RTS : 0)
|
||||
@@ -213,7 +213,7 @@ int ircomm_tty_tiocmset(struct tty_struct *tty,
|
||||
{
|
||||
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
|
||||
|
||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
|
||||
IRDA_ASSERT(self != NULL, return -1;);
|
||||
@@ -362,7 +362,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty,
|
||||
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
|
||||
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
|
||||
(cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
|
||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
Referencia en una nueva incidencia
Block a user