summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/kobil_sct.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-07-22 14:14:22 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-23 00:03:25 +0400
commitb31f658b0bb42b315c22ae2ef814e5fba36ac737 (patch)
treeb7a811ff4d74868b2efdb2cd870d759ebe9111a5 /drivers/usb/serial/kobil_sct.c
parentdee0a7ccaa0bcdeebb590879d68739cce4ff1b07 (diff)
downloadlinux-b31f658b0bb42b315c22ae2ef814e5fba36ac737.tar.xz
kobil_sct: Fix ioctls
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/kobil_sct.c')
-rw-r--r--drivers/usb/serial/kobil_sct.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index f0f8353ec1ac..deba28ec77e8 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -640,9 +640,11 @@ static void kobil_set_termios(struct tty_struct *tty,
priv = usb_get_serial_port_data(port);
if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
- priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)
+ priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
/* This device doesn't support ioctl calls */
+ *tty->termios = *old;
return;
+ }
speed = tty_get_baud_rate(tty);
switch (speed) {
@@ -704,7 +706,7 @@ static int kobil_ioctl(struct tty_struct *tty, struct file *file,
if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)
/* This device doesn't support ioctl calls */
- return 0;
+ return -ENOIOCTLCMD;
switch (cmd) {
case TCFLSH: