diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-09-12 14:49:44 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-10-13 07:50:43 +0300 |
commit | f82fc0fedf28ba09b0abd0533202447846d48fb9 (patch) | |
tree | daed890d0869e1d5d8052ad442031f9cc29b4d74 | |
parent | 930236a30897532653a61ed22ae7eca13154accd (diff) | |
download | linux-f82fc0fedf28ba09b0abd0533202447846d48fb9.tar.xz |
synclink: reduce pointless checks in ->ioctl()
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>
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 3 | ||||
-rw-r--r-- | drivers/tty/synclink.c | 3 | ||||
-rw-r--r-- | drivers/tty/synclink_gt.c | 3 | ||||
-rw-r--r-- | drivers/tty/synclinkmp.c | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 66b04194aa9f..82f9a6a814ae 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -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; } diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c index fbdf4d01c6a9..d55c858d6058 100644 --- a/drivers/tty/synclink.c +++ b/drivers/tty/synclink.c @@ -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; } diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index a94086597ebd..b8287a010336 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c @@ -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; } diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c index 1e4d5b9c981a..fcb91bf7a15b 100644 --- a/drivers/tty/synclinkmp.c +++ b/drivers/tty/synclinkmp.c @@ -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; } |