]> git.baikalelectronics.ru Git - kernel.git/commitdiff
serial: Use bits for UART_LSR_BRK_ERROR_BITS/MSR_ANY_DELTA
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 24 Jun 2022 20:54:21 +0000 (23:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 12:41:31 +0000 (14:41 +0200)
Instead of listing the bits for UART_LSR_BRK_ERROR_BITS and
UART_MSR_ANY_DELTA in comment, use them to define instead.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220624205424.12686-4-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/serial_reg.h

index f51bc8f368134a172c05f9a1d5cb3a53e19dc4d3..bab3b39266cc24d110a06b641bd94da820b836cd 100644 (file)
 #define UART_LSR_PE            0x04 /* Parity error indicator */
 #define UART_LSR_OE            0x02 /* Overrun error indicator */
 #define UART_LSR_DR            0x01 /* Receiver data ready */
-#define UART_LSR_BRK_ERROR_BITS        0x1E /* BI, FE, PE, OE bits */
+#define UART_LSR_BRK_ERROR_BITS        (UART_LSR_BI|UART_LSR_FE|UART_LSR_PE|UART_LSR_OE)
 
 #define UART_MSR       6       /* In:  Modem Status Register */
 #define UART_MSR_DCD           0x80 /* Data Carrier Detect */
 #define UART_MSR_TERI          0x04 /* Trailing edge ring indicator */
 #define UART_MSR_DDSR          0x02 /* Delta DSR */
 #define UART_MSR_DCTS          0x01 /* Delta CTS */
-#define UART_MSR_ANY_DELTA     0x0F /* Any of the delta bits! */
+#define UART_MSR_ANY_DELTA     (UART_MSR_DDCD|UART_MSR_TERI|UART_MSR_DDSR|UART_MSR_DCTS)
 
 #define UART_SCR       7       /* I/O: Scratch Register */