summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_port.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-11-25 15:05:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-19 15:01:19 +0100
commitd9c1d3cbdeec94f077679b73ed5ce3a4fe4bf4b8 (patch)
tree5987b0bf061ca7c5c1a0b69236f1b2fb1f3cb2cd /drivers/tty/serial/8250/8250_port.c
parentef460db2a7c1df5eda2ea6011e7586e54e23b8c4 (diff)
downloadlinux-stable-d9c1d3cbdeec94f077679b73ed5ce3a4fe4bf4b8.tar.gz
linux-stable-d9c1d3cbdeec94f077679b73ed5ce3a4fe4bf4b8.tar.bz2
linux-stable-d9c1d3cbdeec94f077679b73ed5ce3a4fe4bf4b8.zip
serial: 8250: Name MSR literals
Add UART_MSR_STATUS_BITS for CD, RI, DSR & CTS. Use names for the literal. Don't make the define for combined flags part of UAPI. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221125130509.8482-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_port.c')
-rw-r--r--drivers/tty/serial/8250/8250_port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 8676f8b7f2e3..c870ee8e80b6 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1268,9 +1268,9 @@ static void autoconfig(struct uart_8250_port *up)
*/
if (!(port->flags & UPF_SKIP_TEST)) {
serial8250_out_MCR(up, UART_MCR_LOOP | 0x0A);
- status1 = serial_in(up, UART_MSR) & 0xF0;
+ status1 = serial_in(up, UART_MSR) & UART_MSR_STATUS_BITS;
serial8250_out_MCR(up, save_mcr);
- if (status1 != 0x90) {
+ if (status1 != (UART_MSR_DCD | UART_MSR_CTS)) {
spin_unlock_irqrestore(&port->lock, flags);
DEBUG_AUTOCONF("LOOP test failed (%02x) ",
status1);