Skip to content

Commit

Permalink
synclink: reduce pointless checks in ->ioctl()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Oct 13, 2018
1 parent 930236a commit f82fc0f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions drivers/char/pcmcia/synclink_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/tty/synclink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/tty/synclink_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/tty/synclinkmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f82fc0f

Please sign in to comment.