diff options
author | Michael Walle <michael@walle.cc> | 2021-05-12 16:12:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-13 16:08:26 +0200 |
commit | ec22c3eec5439fb012a41d49b015c13ca9b91b6c (patch) | |
tree | 198a5af482d68f35a4d7d936a98f5896d610f718 /drivers/tty/serial/fsl_lpuart.c | |
parent | ccf08fd1204bcb5311cc10aea037c71c6e74720a (diff) | |
download | linux-stable-ec22c3eec5439fb012a41d49b015c13ca9b91b6c.tar.gz linux-stable-ec22c3eec5439fb012a41d49b015c13ca9b91b6c.tar.bz2 linux-stable-ec22c3eec5439fb012a41d49b015c13ca9b91b6c.zip |
serial: fsl_lpuart: use UARTDATA_MASK macro
Use the corresponding macro instead of the magic number. While at it,
drop the useless cast to "unsigned char".
Signed-off-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20210512141255.18277-3-michael@walle.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/fsl_lpuart.c')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 120527cb8a81..cabfc1c5d701 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -928,9 +928,9 @@ static void lpuart32_rxint(struct lpuart_port *sport) */ sr = lpuart32_read(&sport->port, UARTSTAT); rx = lpuart32_read(&sport->port, UARTDATA); - rx &= 0x3ff; + rx &= UARTDATA_MASK; - if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) + if (uart_handle_sysrq_char(&sport->port, rx)) continue; if (sr & (UARTSTAT_PE | UARTSTAT_OR | UARTSTAT_FE)) { |