Skip to content

Commit f82fc0f

Browse files
author
Al Viro
committed
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 <[email protected]>
1 parent 930236a commit f82fc0f

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

drivers/char/pcmcia/synclink_cs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,8 +2237,7 @@ static int mgslpc_ioctl(struct tty_struct *tty,
22372237
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_ioctl"))
22382238
return -ENODEV;
22392239

2240-
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
2241-
(cmd != TIOCMIWAIT)) {
2240+
if (cmd != TIOCMIWAIT) {
22422241
if (tty_io_error(tty))
22432242
return -EIO;
22442243
}

drivers/tty/synclink.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,8 +2959,7 @@ static int mgsl_ioctl(struct tty_struct *tty,
29592959
if (mgsl_paranoia_check(info, tty->name, "mgsl_ioctl"))
29602960
return -ENODEV;
29612961

2962-
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
2963-
(cmd != TIOCMIWAIT)) {
2962+
if (cmd != TIOCMIWAIT) {
29642963
if (tty_io_error(tty))
29652964
return -EIO;
29662965
}

drivers/tty/synclink_gt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,8 +1029,7 @@ static int ioctl(struct tty_struct *tty,
10291029
return -ENODEV;
10301030
DBGINFO(("%s ioctl() cmd=%08X\n", info->device_name, cmd));
10311031

1032-
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
1033-
(cmd != TIOCMIWAIT)) {
1032+
if (cmd != TIOCMIWAIT) {
10341033
if (tty_io_error(tty))
10351034
return -EIO;
10361035
}

drivers/tty/synclinkmp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,8 +1259,7 @@ static int ioctl(struct tty_struct *tty,
12591259
if (sanity_check(info, tty->name, "ioctl"))
12601260
return -ENODEV;
12611261

1262-
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
1263-
(cmd != TIOCMIWAIT)) {
1262+
if (cmd != TIOCMIWAIT) {
12641263
if (tty_io_error(tty))
12651264
return -EIO;
12661265
}

0 commit comments

Comments
 (0)