]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
kobil_sct: Fix ioctls
authorAlan Cox <alan@redhat.com>
Tue, 22 Jul 2008 10:14:22 +0000 (11:14 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Jul 2008 20:03:25 +0000 (13:03 -0700)
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>
drivers/usb/serial/kobil_sct.c

index f0f8353ec1acb9b7b52f761446225c0deff49fa3..deba28ec77e8e43cab07691bf17ed68624b9d517 100644 (file)
@@ -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: