drivers: smbus: pch: Simplify IRQ flags
Use COND_CODE_1() macro instead of macro trampoline. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
43c8df7893
commit
d7fd3db32e
1 changed files with 4 additions and 4 deletions
|
@ -1005,10 +1005,10 @@ static void smbus_isr(const struct device *dev)
|
|||
|
||||
/* Device macro initialization / DTS hackery */
|
||||
|
||||
#define SMBUS_PCH_IRQ_FLAGS_SENSE0(n) 0
|
||||
#define SMBUS_PCH_IRQ_FLAGS_SENSE1(n) DT_INST_IRQ(n, sense)
|
||||
#define SMBUS_PCH_IRQ_FLAGS(n) \
|
||||
_CONCAT(SMBUS_PCH_IRQ_FLAGS_SENSE, DT_INST_IRQ_HAS_CELL(n, sense))(n)
|
||||
#define SMBUS_PCH_IRQ_FLAGS(n) \
|
||||
COND_CODE_1(DT_INST_IRQ_HAS_CELL(n, sense), \
|
||||
(DT_INST_IRQ(n, sense)), \
|
||||
(0))
|
||||
|
||||
#define SMBUS_IRQ_CONFIG(n) \
|
||||
BUILD_ASSERT(IS_ENABLED(CONFIG_DYNAMIC_INTERRUPTS), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue