serial: core: Move struct uart_port::quirks closer to possible values
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 4 Mar 2024 12:27:02 +0000 (14:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Mar 2024 13:38:28 +0000 (13:38 +0000)
Currently it's not crystal clear what UPIO_* and UPQ_* definitions
belong to. Reindent the code, so it will be easy to read and understand.
No functional changes intended.

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240304123035.758700-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/serial_core.h

index bb0f2d4ac62f68b0b8b3a47bddc1ff19f61c358d..f9d7f0a625fdd5f4022e366005c97b5ae6f1a0f1 100644 (file)
@@ -467,8 +467,8 @@ struct uart_port {
        unsigned int            fifosize;               /* tx fifo size */
        unsigned char           x_char;                 /* xon/xoff char */
        unsigned char           regshift;               /* reg offset shift */
+
        unsigned char           iotype;                 /* io access style */
-       unsigned char           quirks;                 /* internal quirks */
 
 #define UPIO_PORT              (SERIAL_IO_PORT)        /* 8b I/O port access */
 #define UPIO_HUB6              (SERIAL_IO_HUB6)        /* Hub6 ISA card */
@@ -479,7 +479,9 @@ struct uart_port {
 #define UPIO_MEM32BE           (SERIAL_IO_MEM32BE)     /* 32b big endian */
 #define UPIO_MEM16             (SERIAL_IO_MEM16)       /* 16b little endian */
 
-       /* quirks must be updated while holding port mutex */
+       unsigned char           quirks;                 /* internal quirks */
+
+       /* internal quirks must be updated while holding port mutex */
 #define UPQ_NO_TXEN_TEST       BIT(0)
 
        unsigned int            read_status_mask;       /* driver specific */