drivers: interrupt_controller: change dt macro
Replace the use of `DT_NODELABEL(exti)` which depends on the node label with the defined EXTI_NODE macro using the instance with the `st_stm32_exti` compatible. Since both macros point to the same node, this change doesn't affect the code logic, but makes it independent of the node label, in preparation for the addition of the STM32MP2 exti nodes. Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
This commit is contained in:
parent
fb4f0f8d18
commit
64ac64d2d6
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ struct stm32_exti_range {
|
|||
uint8_t len;
|
||||
};
|
||||
|
||||
#define NUM_EXTI_LINES DT_PROP(DT_NODELABEL(exti), num_lines)
|
||||
#define NUM_EXTI_LINES DT_PROP(EXTI_NODE, num_lines)
|
||||
|
||||
static IRQn_Type exti_irq_table[NUM_EXTI_LINES] = {[0 ... NUM_EXTI_LINES - 1] = 0xFF};
|
||||
|
||||
|
@ -220,7 +220,7 @@ static int stm32_exti_init(const struct device *dev)
|
|||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
DT_FOREACH_PROP_ELEM(DT_NODELABEL(exti),
|
||||
DT_FOREACH_PROP_ELEM(EXTI_NODE,
|
||||
interrupt_names,
|
||||
STM32_EXTI_INIT_LINE_RANGE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue