Commit f82fc0fe authored by Al Viro's avatar Al Viro

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 930236a3
...@@ -2237,8 +2237,7 @@ static int mgslpc_ioctl(struct tty_struct *tty, ...@@ -2237,8 +2237,7 @@ static int mgslpc_ioctl(struct tty_struct *tty,
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_ioctl")) if (mgslpc_paranoia_check(info, tty->name, "mgslpc_ioctl"))
return -ENODEV; return -ENODEV;
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && if (cmd != TIOCMIWAIT) {
(cmd != TIOCMIWAIT)) {
if (tty_io_error(tty)) if (tty_io_error(tty))
return -EIO; return -EIO;
} }
......
...@@ -2959,8 +2959,7 @@ static int mgsl_ioctl(struct tty_struct *tty, ...@@ -2959,8 +2959,7 @@ static int mgsl_ioctl(struct tty_struct *tty,
if (mgsl_paranoia_check(info, tty->name, "mgsl_ioctl")) if (mgsl_paranoia_check(info, tty->name, "mgsl_ioctl"))
return -ENODEV; return -ENODEV;
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && if (cmd != TIOCMIWAIT) {
(cmd != TIOCMIWAIT)) {
if (tty_io_error(tty)) if (tty_io_error(tty))
return -EIO; return -EIO;
} }
......
...@@ -1029,8 +1029,7 @@ static int ioctl(struct tty_struct *tty, ...@@ -1029,8 +1029,7 @@ static int ioctl(struct tty_struct *tty,
return -ENODEV; return -ENODEV;
DBGINFO(("%s ioctl() cmd=%08X\n", info->device_name, cmd)); DBGINFO(("%s ioctl() cmd=%08X\n", info->device_name, cmd));
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && if (cmd != TIOCMIWAIT) {
(cmd != TIOCMIWAIT)) {
if (tty_io_error(tty)) if (tty_io_error(tty))
return -EIO; return -EIO;
} }
......
...@@ -1259,8 +1259,7 @@ static int ioctl(struct tty_struct *tty, ...@@ -1259,8 +1259,7 @@ static int ioctl(struct tty_struct *tty,
if (sanity_check(info, tty->name, "ioctl")) if (sanity_check(info, tty->name, "ioctl"))
return -ENODEV; return -ENODEV;
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && if (cmd != TIOCMIWAIT) {
(cmd != TIOCMIWAIT)) {
if (tty_io_error(tty)) if (tty_io_error(tty))
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment