uart: ns16550: simplify UART_NS16550_IRQ_FLAGS
Using COND_CODE_1() is more intuitive when looking at the code, instead of some macro trampoline magic. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
fe10897f70
commit
39f8b7d51d
1 changed files with 3 additions and 3 deletions
|
@ -1220,10 +1220,10 @@ static const struct uart_driver_api uart_ns16550_driver_api = {
|
|||
#endif
|
||||
};
|
||||
|
||||
#define UART_NS16550_IRQ_FLAGS_SENSE0(n) 0
|
||||
#define UART_NS16550_IRQ_FLAGS_SENSE1(n) DT_INST_IRQ(n, sense)
|
||||
#define UART_NS16550_IRQ_FLAGS(n) \
|
||||
_CONCAT(UART_NS16550_IRQ_FLAGS_SENSE, DT_INST_IRQ_HAS_CELL(n, sense))(n)
|
||||
COND_CODE_1(DT_INST_IRQ_HAS_CELL(n, sense), \
|
||||
(DT_INST_IRQ(n, sense)), \
|
||||
(0))
|
||||
|
||||
/* not PCI(e) */
|
||||
#define UART_NS16550_IRQ_CONFIG_PCIE0(n) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue