Skip to content

Commit

Permalink
pch_uart: Fix parity setting issue
Browse files Browse the repository at this point in the history
commit 38bd2a1 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information
Tomoya MORINAGA authored and Ben Hutchings committed Aug 9, 2012
1 parent 0eaadc0 commit dbf6df1
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 @@ -1265,7 +1265,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 dbf6df1

Please sign in to comment.