OSDN Git Service

synclink: reduce pointless checks in ->ioctl()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 12 Sep 2018 11:49:44 +0000 (07:49 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 13 Oct 2018 04:50:43 +0000 (00:50 -0400)
it's never getting called with TIOC[SG]SERIAL anymore (nor has
it ever supported those, while we are at it)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/char/pcmcia/synclink_cs.c
drivers/tty/synclink.c
drivers/tty/synclink_gt.c
drivers/tty/synclinkmp.c

index 66b0419..82f9a6a 100644 (file)
@@ -2237,8 +2237,7 @@ static int mgslpc_ioctl(struct tty_struct *tty,
        if (mgslpc_paranoia_check(info, tty->name, "mgslpc_ioctl"))
                return -ENODEV;
 
-       if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-           (cmd != TIOCMIWAIT)) {
+       if (cmd != TIOCMIWAIT) {
                if (tty_io_error(tty))
                    return -EIO;
        }
index fbdf4d0..d55c858 100644 (file)
@@ -2959,8 +2959,7 @@ static int mgsl_ioctl(struct tty_struct *tty,
        if (mgsl_paranoia_check(info, tty->name, "mgsl_ioctl"))
                return -ENODEV;
 
-       if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-           (cmd != TIOCMIWAIT)) {
+       if (cmd != TIOCMIWAIT) {
                if (tty_io_error(tty))
                    return -EIO;
        }
index a940865..b8287a0 100644 (file)
@@ -1029,8 +1029,7 @@ static int ioctl(struct tty_struct *tty,
                return -ENODEV;
        DBGINFO(("%s ioctl() cmd=%08X\n", info->device_name, cmd));
 
-       if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-           (cmd != TIOCMIWAIT)) {
+       if (cmd != TIOCMIWAIT) {
                if (tty_io_error(tty))
                    return -EIO;
        }
index 1e4d5b9..fcb91bf 100644 (file)
@@ -1259,8 +1259,7 @@ static int ioctl(struct tty_struct *tty,
        if (sanity_check(info, tty->name, "ioctl"))
                return -ENODEV;
 
-       if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-           (cmd != TIOCMIWAIT)) {
+       if (cmd != TIOCMIWAIT) {
                if (tty_io_error(tty))
                    return -EIO;
        }