Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18900ca6 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

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: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1aabf523
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ static int rs_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
	    (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
	    (cmd != TIOCMIWAIT)) {
		if (tty->flags & (1 << TTY_IO_ERROR))
		if (tty_io_error(tty))
		    return -EIO;
	}

+1 −1
Original line number Diff line number Diff line
@@ -2246,7 +2246,7 @@ static int mgslpc_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;
	}

+3 −3
Original line number Diff line number Diff line
@@ -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 */
+2 −2
Original line number Diff line number Diff line
@@ -1804,7 +1804,7 @@ static int tty3270_ioctl(struct tty_struct *tty, unsigned int cmd,
	tp = tty->driver_data;
	if (!tp)
		return -ENODEV;
	if (tty->flags & (1 << TTY_IO_ERROR))
	if (tty_io_error(tty))
		return -EIO;
	return kbd_ioctl(tp->kbd, cmd, arg);
}
@@ -1818,7 +1818,7 @@ static long tty3270_compat_ioctl(struct tty_struct *tty,
	tp = tty->driver_data;
	if (!tp)
		return -ENODEV;
	if (tty->flags & (1 << TTY_IO_ERROR))
	if (tty_io_error(tty))
		return -EIO;
	return kbd_ioctl(tp->kbd, cmd, (unsigned long)compat_ptr(arg));
}
+1 −1
Original line number Diff line number Diff line
@@ -1255,7 +1255,7 @@ static int dgnc_block_til_ready(struct tty_struct *tty,
			if (file->f_flags & O_NONBLOCK)
				break;

			if (tty->flags & (1 << TTY_IO_ERROR)) {
			if (tty_io_error(tty)) {
				retval = -EIO;
				break;
			}
Loading