From: Alan Cox Date: Tue, 22 Jul 2008 10:14:22 +0000 (+0100) Subject: kobil_sct: Fix ioctls X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b31f658b0bb42b315c22ae2ef814e5fba36ac737;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git kobil_sct: Fix ioctls Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- 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: