Skip to content

Commit 79d713b

Browse files
andy-shevgregkh
authored andcommitted
serial: core: Add UPIO_UNKNOWN constant for unknown port type
In some APIs we would like to assign the special value to iotype and compare against it in another places. Introduce UPIO_UNKNOWN for this purpose. Note, we can't use 0, because it's a valid value for IO port access. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 35c822a commit 79d713b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/linux/serial_core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ struct uart_port {
470470

471471
unsigned char iotype; /* io access style */
472472

473+
#define UPIO_UNKNOWN ((unsigned char)~0U) /* UCHAR_MAX */
473474
#define UPIO_PORT (SERIAL_IO_PORT) /* 8b I/O port access */
474475
#define UPIO_HUB6 (SERIAL_IO_HUB6) /* Hub6 ISA card */
475476
#define UPIO_MEM (SERIAL_IO_MEM) /* driver-specific */

0 commit comments

Comments
 (0)