usb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test
authorAlan Cox <alan@redhat.com>
Tue, 22 Jul 2008 10:10:53 +0000 (11:10 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Jul 2008 20:03:23 +0000 (13:03 -0700)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/serial/cypress_m8.c

index bb9c7c45e98f5951234507da259dc34a909186f5..22837a3f2f899e963f0d944814d222bcd2e494f5 100644 (file)
@@ -1093,27 +1093,24 @@ static void cypress_set_termios(struct tty_struct *tty,
        } else
                parity_enable = parity_type = 0;
 
-       if (cflag & CSIZE) {
-               switch (cflag & CSIZE) {
-               case CS5:
-                       data_bits = 0;
-                       break;
-               case CS6:
-                       data_bits = 1;
-                       break;
-               case CS7:
-                       data_bits = 2;
-                       break;
-               case CS8:
-                       data_bits = 3;
-                       break;
-               default:
-                       err("%s - CSIZE was set, but not CS5-CS8",
-                                       __func__);
-                       data_bits = 3;
-       } else
+       switch (cflag & CSIZE) {
+       case CS5:
+               data_bits = 0;
+               break;
+       case CS6:
+               data_bits = 1;
+               break;
+       case CS7:
+               data_bits = 2;
+               break;
+       case CS8:
                data_bits = 3;
-
+               break;
+       default:
+               err("%s - CSIZE was set, but not CS5-CS8",
+                               __func__);
+               data_bits = 3;
+       }
        spin_lock_irqsave(&priv->lock, flags);
        oldlines = priv->line_control;
        if ((cflag & CBAUD) == B0) {