From 794893315afa7f4a557ec83784e040a3bfec850a Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 15 Sep 2023 20:46:42 +0000 Subject: [PATCH] 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 --- drivers/interrupt_controller/intc_loapic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/interrupt_controller/intc_loapic.c b/drivers/interrupt_controller/intc_loapic.c index 52722c5de45..742ae530596 100644 --- a/drivers/interrupt_controller/intc_loapic.c +++ b/drivers/interrupt_controller/intc_loapic.c @@ -413,10 +413,10 @@ static int loapic_pm_action(const struct device *dev, } #endif /* CONFIG_PM_DEVICE */ -PM_DEVICE_DEFINE(loapic, loapic_pm_action); +PM_DEVICE_DT_INST_DEFINE(0, loapic_pm_action); -DEVICE_DEFINE(loapic, "loapic", loapic_init, PM_DEVICE_GET(loapic), NULL, NULL, - PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY, NULL); +DEVICE_DT_INST_DEFINE(0, loapic_init, PM_DEVICE_DT_INST_GET(0), NULL, NULL, + PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY, NULL); #if CONFIG_LOAPIC_SPURIOUS_VECTOR extern void z_loapic_spurious_handler(void);