drivers: interrupt_controller: i/loapic: use DEVICE_DEFINE
Define the device using DEVICE_DEFINE macro, so that a single option can be used regardless of PM being enabled or not. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
60827c2dd6
commit
c78c312c82
2 changed files with 5 additions and 13 deletions
|
@ -426,13 +426,10 @@ static int loapic_pm_action(const struct device *dev,
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_PM_DEVICE */
|
||||
|
||||
SYS_DEVICE_DEFINE("loapic", loapic_init, loapic_pm_action, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
#else
|
||||
SYS_INIT(loapic_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
#endif /* CONFIG_PM_DEVICE */
|
||||
|
||||
DEVICE_DEFINE(loapic, "loapic", loapic_init, loapic_pm_action, NULL, NULL,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
|
||||
|
||||
#if CONFIG_LOAPIC_SPURIOUS_VECTOR
|
||||
extern void z_loapic_spurious_handler(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue