From: Colin Leitner Date: Fri, 8 Nov 2013 21:52:34 +0000 (+0100) Subject: USB: mos7840: correct handling of CS5 setting X-Git-Tag: firefly_0821_release~3679^2~3342 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d410cf277e7aa0168a2b88d8a49f75fe85809e68;p=firefly-linux-kernel-4.4.55.git USB: mos7840: correct handling of CS5 setting commit 78692cc3382e0603a47e1f2aaeffe0d99891994d 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: Colin Leitner Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 8b3d0abe7e14..d06013033def 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -1875,25 +1875,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) {