serial: meson: fix setting number of stop bits
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 19 Apr 2017 20:17:24 +0000 (22:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 14:34:56 +0000 (16:34 +0200)
The stop bit value as to be or'ed, so far this worked only just by chance
because AML_UART_STOP_BIN_1SB is 0.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/meson_uart.c

index 60f16795d16bd2f1012df899b1f01585dab74c9e..e2e25da10f19bc8be4e2a5f793dfce6c3f767fe2 100644 (file)
@@ -355,7 +355,7 @@ static void meson_uart_set_termios(struct uart_port *port,
        if (cflags & CSTOPB)
                val |= AML_UART_STOP_BIN_2SB;
        else
-               val &= ~AML_UART_STOP_BIN_1SB;
+               val |= AML_UART_STOP_BIN_1SB;
 
        if (cflags & CRTSCTS)
                val &= ~AML_UART_TWO_WIRE_EN;