summaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorMikhail Zaytsev <flashed@mail.ru>2018-01-06 20:14:02 +0300
committerJohan Hovold <johan@kernel.org>2018-01-09 12:50:59 +0100
commit63443a0b2ab277ef677640bc32b4f94661821b70 (patch)
tree46e7ec19af2e6c78e1ee6ef64020bfd832a15fff /drivers/usb/serial
parentc7b8f77872c73f69a16528a9eb87afefcccdc18b (diff)
USB: serial: ark3116: remove dummy TIOCSSERIAL ioctl
The patch removes unused TIOCSSERIAL ioctl case and adds the default block to the switch. This will make the ioctl return -ENOTTY to user space (e.g. setserial), which indicates that TIOCSSERIAL really isn't supported for these devices currently. Note that these (dummy) ioctl implementations where added by commit 2f430b4bbae7 ("USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls.") back in 2006. This in turn appears to have been triggered by a change in a user space tool, wvdial, which started erroring out if either was missing. There are some bug reports about that against wvdial from around that time, and looking at the wvstreams (library) code now, it looks like the issue has indeed been resolved by handling errors more gracefully (e.g. just logging them). User space really should not make assumptions about these ioctl always being implemented, but if this turns out to be a problem for anyone using this driver, we'll add TIOCSSERIAL back in some form. Signed-off-by: Mikhail Zaytsev <flashed@mail.ru> [johan: amend commit message with backstory ] Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/ark3116.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 23d46ef87d64..2e957c76f61e 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -418,10 +418,8 @@ static int ark3116_ioctl(struct tty_struct *tty,
return -EFAULT;
return 0;
- case TIOCSSERIAL:
- if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
- return -EFAULT;
- return 0;
+ default:
+ break;
}
return -ENOIOCTLCMD;