From: Alan Cox Date: Thu, 18 Oct 2007 08:24:21 +0000 (-0700) Subject: USB: kobil_sct: termios encoding fixups X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6ebf80dbc186d4782d6b08cf3676e4f22a8a84b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git USB: kobil_sct: termios encoding fixups - Clear unsupported CMSPAR - Encode resulting speeds Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 6f224195bd25..aee450246bfd 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -616,8 +616,9 @@ static void kobil_set_termios(struct usb_serial_port *port, struct ktermios *old case 1200: urb_val = SUSBCR_SBR_1200; break; - case 9600: default: + speed = 9600; + case 9600: urb_val = SUSBCR_SBR_9600; break; } @@ -641,6 +642,8 @@ static void kobil_set_termios(struct usb_serial_port *port, struct ktermios *old urb_val |= SUSBCR_SPASB_NoParity; strcat(settings, "No Parity"); } + port->tty->termios->c_cflag &= ~CMSPAR; + tty_encode_baud_rate(port->tty, speed, speed); result = usb_control_msg( port->serial->dev, usb_rcvctrlpipe(port->serial->dev, 0 ),