diff options
author | Timur Tabi <timur@codeaurora.org> | 2015-10-07 22:27:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-18 06:29:21 +0200 |
commit | 71a5cd8a4a2602a6e9010b557a23af0a54df87b6 (patch) | |
tree | 68904f0375e699197408b519e90fb6a1a8fdd241 /drivers/tty | |
parent | ttyFDC: Fix build problems due to use of module_{init,exit} (diff) | |
download | linux-71a5cd8a4a2602a6e9010b557a23af0a54df87b6.tar.xz linux-71a5cd8a4a2602a6e9010b557a23af0a54df87b6.zip |
serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
The UART_DUMMY_DR_RX status bit is equal to (1 << 16), so a u16 is too small
to hold that value. The result is that UART_DUMMY_DR_RX is never passed
to uart_insert_char(). This means that we're always accepting characters,
even when CREAD (in termios) is not set.
Signed-off-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index fd27e986b1dd..899a77187bde 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -191,8 +191,8 @@ struct uart_amba_port { */ static int pl011_fifo_to_tty(struct uart_amba_port *uap) { - u16 status, ch; - unsigned int flag, max_count = 256; + u16 status; + unsigned int ch, flag, max_count = 256; int fifotaken = 0; while (max_count--) { |