Skip to content

Commit

Permalink
serial: core: Add UPIO_UNKNOWN constant for unknown port type
Browse files Browse the repository at this point in the history
[ Upstream commit 79d713b ]

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]>
Stable-dep-of: 87d80bf ("serial: 8250_dw: Don't use struct dw8250_data outside of 8250_dw")
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
andy-shev authored and gregkh committed Jun 21, 2024
1 parent 29d35f0 commit ae91751
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/serial_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ struct uart_port {
unsigned char iotype; /* io access style */
unsigned char quirks; /* internal quirks */

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

0 comments on commit ae91751

Please sign in to comment.