Skip to content

Commit

Permalink
serial: tegra: clean up tty-flag assignments
Browse files Browse the repository at this point in the history
The tty break and error flags are not bit masks so do not to use bitwise
OR when assigning them.

Note that there is no functional change due to the if-else construct and
flag having been initialised to zero (TTY_NORMAL).

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Nov 26, 2014
1 parent cb8ee9f commit f0c1e46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/serial/serial-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,16 @@ static char tegra_uart_decode_rx_error(struct tegra_uart_port *tup,
if (unlikely(lsr & TEGRA_UART_LSR_ANY)) {
if (lsr & UART_LSR_OE) {
/* Overrrun error */
flag |= TTY_OVERRUN;
flag = TTY_OVERRUN;
tup->uport.icount.overrun++;
dev_err(tup->uport.dev, "Got overrun errors\n");
} else if (lsr & UART_LSR_PE) {
/* Parity error */
flag |= TTY_PARITY;
flag = TTY_PARITY;
tup->uport.icount.parity++;
dev_err(tup->uport.dev, "Got Parity errors\n");
} else if (lsr & UART_LSR_FE) {
flag |= TTY_FRAME;
flag = TTY_FRAME;
tup->uport.icount.frame++;
dev_err(tup->uport.dev, "Got frame errors\n");
} else if (lsr & UART_LSR_BI) {
Expand Down

0 comments on commit f0c1e46

Please sign in to comment.