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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
1aabf523a2
commit
18900ca65a
@@ -1261,7 +1261,7 @@ static int ioctl(struct tty_struct *tty,
|
||||
|
||||
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
|
||||
(cmd != TIOCMIWAIT)) {
|
||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -3285,7 +3285,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
|
||||
printk("%s(%d):%s block_til_ready()\n",
|
||||
__FILE__,__LINE__, tty->driver->name );
|
||||
|
||||
if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){
|
||||
if (filp->f_flags & O_NONBLOCK || tty_io_error(tty)) {
|
||||
/* nonblock mode is set or port is not enabled */
|
||||
/* just verify that callout device is not active */
|
||||
port->flags |= ASYNC_NORMAL_ACTIVE;
|
||||
|
Reference in New Issue
Block a user