USB: kobil_sct: termios encoding fixups
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Thu, 18 Oct 2007 08:24:21 +0000 (01:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 25 Oct 2007 19:18:41 +0000 (12:18 -0700)
- Clear unsupported CMSPAR
- Encode resulting speeds

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/kobil_sct.c

index 6f224195bd25a6048efc65cc26f9b197d6f87a70..aee450246bfd8b0befa879ca9613415ad649d577 100644 (file)
@@ -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 ),