Skip to content

Commit 7948933

Browse files
fabiobaltiericarlescufi
authored andcommitted
intc: loapic: convert DEVICE_DEFINE to DEVICE_DT_INST_DEFINE
Convert DEVICE_DEFINE to DEVICE_DT_INST_DEFINE, this allows the build system to track the device dependencies and ensure that the interrupt controller is initialized before other devices using it. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent ceb02b3 commit 7948933

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/interrupt_controller/intc_loapic.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,10 @@ static int loapic_pm_action(const struct device *dev,
413413
}
414414
#endif /* CONFIG_PM_DEVICE */
415415

416-
PM_DEVICE_DEFINE(loapic, loapic_pm_action);
416+
PM_DEVICE_DT_INST_DEFINE(0, loapic_pm_action);
417417

418-
DEVICE_DEFINE(loapic, "loapic", loapic_init, PM_DEVICE_GET(loapic), NULL, NULL,
419-
PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY, NULL);
418+
DEVICE_DT_INST_DEFINE(0, loapic_init, PM_DEVICE_DT_INST_GET(0), NULL, NULL,
419+
PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY, NULL);
420420

421421
#if CONFIG_LOAPIC_SPURIOUS_VECTOR
422422
extern void z_loapic_spurious_handler(void);

0 commit comments

Comments
 (0)