Skip to content

Commit

Permalink
pch_uart: Fix parity setting issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomoya MORINAGA authored and Greg Kroah-Hartman committed Jul 26, 2012
1 parent 9539dfb commit 38bd2a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/pch_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,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;
Expand Down

0 comments on commit 38bd2a1

Please sign in to comment.