Skip to content

Commit

Permalink
kobil_sct: Fix ioctls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 22, 2008
1 parent dee0a7c commit b31f658
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/usb/serial/kobil_sct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b31f658

Please sign in to comment.