Skip to content

Commit

Permalink
USB: mos7840: correct handling of CS5 setting
Browse files Browse the repository at this point in the history
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: Colin Leitner <colin.leitner@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Colin Leitner authored and Greg Kroah-Hartman committed Dec 3, 2013
1 parent 711fbdf commit 78692cc
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -1813,25 +1813,25 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
iflag = tty->termios.c_iflag;

/* Change the number of bits */
if (cflag & CSIZE) {
switch (cflag & CSIZE) {
case CS5:
lData = LCR_BITS_5;
break;
switch (cflag & CSIZE) {
case CS5:
lData = LCR_BITS_5;
break;

case CS6:
lData = LCR_BITS_6;
break;
case CS6:
lData = LCR_BITS_6;
break;

case CS7:
lData = LCR_BITS_7;
break;
default:
case CS8:
lData = LCR_BITS_8;
break;
}
case CS7:
lData = LCR_BITS_7;
break;

default:
case CS8:
lData = LCR_BITS_8;
break;
}

/* Change the Parity bit */
if (cflag & PARENB) {
if (cflag & PARODD) {
Expand Down

0 comments on commit 78692cc

Please sign in to comment.