]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pch_uart: Fix parity setting issue
authorTomoya MORINAGA <tomoya.rohm@gmail.com>
Fri, 6 Jul 2012 08:19:43 +0000 (17:19 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:30:36 +0000 (10:30 -0700)
commit 38bd2a1ac736901d1cf4971c78ef952ba92ef78b upstream.

Parity Setting value is reverse.
E.G. In case of setting ODD parity, EVEN value is set.
This patch inverts "if" condition.

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/pch_uart.c

index 20001b749b2618caad293a4c2c321ffe4b33f393..103a25f77d14d43c8d6fbce99b6efb3878c83427 100644 (file)
@@ -1357,7 +1357,7 @@ static void pch_uart_set_termios(struct uart_port *port,
                stb = PCH_UART_HAL_STB1;
 
        if (termios->c_cflag & PARENB) {
-               if (!(termios->c_cflag & PARODD))
+               if (termios->c_cflag & PARODD)
                        parity = PCH_UART_HAL_PARITY_ODD;
                else
                        parity = PCH_UART_HAL_PARITY_EVEN;