Commit 7069fd0b authored by Colin Leitner's avatar Colin Leitner Committed by Greg Kroah-Hartman

USB: mos7840: correct handling of CS5 setting

commit 78692cc3 upstream.

This patch removes an erroneous check of CSIZE, which made it impossible to set
CS5.

Compiles clean, but couldn't test against hardware.
Signed-off-by: default avatarColin Leitner <colin.leitner@gmail.com>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent db2cbb5c
...@@ -1962,7 +1962,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty, ...@@ -1962,7 +1962,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
iflag = tty->termios->c_iflag; iflag = tty->termios->c_iflag;
/* Change the number of bits */ /* Change the number of bits */
if (cflag & CSIZE) {
switch (cflag & CSIZE) { switch (cflag & CSIZE) {
case CS5: case CS5:
lData = LCR_BITS_5; lData = LCR_BITS_5;
...@@ -1975,12 +1974,13 @@ static void mos7840_change_port_settings(struct tty_struct *tty, ...@@ -1975,12 +1974,13 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
case CS7: case CS7:
lData = LCR_BITS_7; lData = LCR_BITS_7;
break; break;
default: default:
case CS8: case CS8:
lData = LCR_BITS_8; lData = LCR_BITS_8;
break; break;
} }
}
/* Change the Parity bit */ /* Change the Parity bit */
if (cflag & PARENB) { if (cflag & PARENB) {
if (cflag & PARODD) { if (cflag & PARODD) {
......
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