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>
Esse commit está contido em:

commit de
Greg Kroah-Hartman

pai
1aabf523a2
commit
18900ca65a
@@ -1351,7 +1351,7 @@ isdn_tty_tiocmget(struct tty_struct *tty)
|
||||
|
||||
if (isdn_tty_paranoia_check(info, tty->name, __func__))
|
||||
return -ENODEV;
|
||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
|
||||
mutex_lock(&modem_info_mutex);
|
||||
@@ -1378,7 +1378,7 @@ isdn_tty_tiocmset(struct tty_struct *tty,
|
||||
|
||||
if (isdn_tty_paranoia_check(info, tty->name, __func__))
|
||||
return -ENODEV;
|
||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
|
||||
#ifdef ISDN_DEBUG_MODEM_IOCTL
|
||||
@@ -1419,7 +1419,7 @@ isdn_tty_ioctl(struct tty_struct *tty, uint cmd, ulong arg)
|
||||
|
||||
if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_ioctl"))
|
||||
return -ENODEV;
|
||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
switch (cmd) {
|
||||
case TCSBRK: /* SVID version: non-zero arg --> no break */
|
||||
|
Referência em uma nova issue
Block a user