Skip to content

Commit 6a6c8b3

Browse files
Alan Coxgregkh
authored andcommitted
usb, kobil: Sort out some bogus tty handling
Stuff noticed while doing the termios conversion. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c97ce27 commit 6a6c8b3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/usb/serial/kobil_sct.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ static void kobil_init_termios(struct tty_struct *tty)
192192
{
193193
/* Default to echo off and other sane device settings */
194194
tty->termios.c_lflag = 0;
195-
tty->termios.c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
196-
tty->termios.c_lflag = IGNBRK | IGNPAR | IXOFF;
195+
tty->termios.c_iflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
196+
tty->termios.c_iflag |= IGNBRK | IGNPAR | IXOFF;
197197
/* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
198198
tty->termios.c_oflag &= ~ONLCR;
199199
}
@@ -588,7 +588,7 @@ static void kobil_set_termios(struct tty_struct *tty,
588588
if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
589589
priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
590590
/* This device doesn't support ioctl calls */
591-
tty->termios = *old;
591+
tty_termios_copy_hw(&tty->termios, old);
592592
return;
593593
}
594594

0 commit comments

Comments
 (0)