USB: kl5kusb105: witch to new speed API
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 10 Aug 2007 21:53:34 +0000 (14:53 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:15 +0000 (14:55 -0700)
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/kl5kusb105.c

index 5a4127e..90e3216 100644 (file)
@@ -728,24 +728,32 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
 #endif
                }
                
-               switch(cflag & CBAUD) {
-               case B0: /* handled below */
+               switch(tty_get_baud_rate(port->tty)) {
+               case 0: /* handled below */
                        break;
-               case B1200: priv->cfg.baudrate = kl5kusb105a_sio_b1200;
+               case 1200:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b1200;
                        break;
-               case B2400: priv->cfg.baudrate = kl5kusb105a_sio_b2400;
+               case 2400:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b2400;
                        break;
-               case B4800: priv->cfg.baudrate = kl5kusb105a_sio_b4800;
+               case 4800:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b4800;
                        break;
-               case B9600: priv->cfg.baudrate = kl5kusb105a_sio_b9600;
+               case 9600:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b9600;
                        break;
-               case B19200: priv->cfg.baudrate = kl5kusb105a_sio_b19200;
+               case 19200:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b19200;
                        break;
-               case B38400: priv->cfg.baudrate = kl5kusb105a_sio_b38400;
+               case 38400:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b38400;
                        break;
-               case B57600: priv->cfg.baudrate = kl5kusb105a_sio_b57600;
+               case 57600:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b57600;
                        break;
-               case B115200: priv->cfg.baudrate = kl5kusb105a_sio_b115200;
+               case 115200:
+                       priv->cfg.baudrate = kl5kusb105a_sio_b115200;
                        break;
                default:
                        err("KLSI USB->Serial converter:"