Commit 77336828 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

usb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 813a224f
...@@ -1093,27 +1093,24 @@ static void cypress_set_termios(struct tty_struct *tty, ...@@ -1093,27 +1093,24 @@ static void cypress_set_termios(struct tty_struct *tty,
} else } else
parity_enable = parity_type = 0; parity_enable = parity_type = 0;
if (cflag & CSIZE) { switch (cflag & CSIZE) {
switch (cflag & CSIZE) { case CS5:
case CS5: data_bits = 0;
data_bits = 0; break;
break; case CS6:
case CS6: data_bits = 1;
data_bits = 1; break;
break; case CS7:
case CS7: data_bits = 2;
data_bits = 2; break;
break; case CS8:
case CS8:
data_bits = 3;
break;
default:
err("%s - CSIZE was set, but not CS5-CS8",
__func__);
data_bits = 3;
} else
data_bits = 3; data_bits = 3;
break;
default:
err("%s - CSIZE was set, but not CS5-CS8",
__func__);
data_bits = 3;
}
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
oldlines = priv->line_control; oldlines = priv->line_control;
if ((cflag & CBAUD) == B0) { if ((cflag & CBAUD) == B0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment