drivers: interrupt_controller: Convert drivers to new DT device macros

Convert interrupt_controller drivers from:

    DEVICE_AND_API_INIT -> DEVICE_DT_INST_DEFINE
    DEVICE_GET -> DEVICE_DT_INST_GET
    DEVICE_DECLARE -> DEVICE_DT_INST_DECLARE

etc...

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-12-17 11:14:17 -06:00 committed by Anas Nashif
commit 2d754333ad
7 changed files with 28 additions and 27 deletions

View file

@ -50,7 +50,7 @@ struct rv32m1_intmux_config {
#define DEV_REGS(dev) (DEV_CFG(dev)->regs)
DEVICE_DECLARE(intmux);
DEVICE_DT_INST_DECLARE(0);
/*
* <irq_nextlevel.h> API
@ -111,7 +111,7 @@ static int rv32m1_intmux_get_line_state(const struct device *dev,
static void rv32m1_intmux_isr(const void *arg)
{
const struct device *dev = DEVICE_GET(intmux);
const struct device *dev = DEVICE_DT_INST_GET(0);
INTMUX_Type *regs = DEV_REGS(dev);
uint32_t channel = POINTER_TO_UINT(arg);
uint32_t line = (regs->CHANNEL[channel].CHn_VEC >> 2);
@ -220,7 +220,6 @@ static int rv32m1_intmux_init(const struct device *dev)
return 0;
}
DEVICE_AND_API_INIT(intmux, DT_INST_LABEL(0),
&rv32m1_intmux_init, NULL,
DEVICE_DT_INST_DEFINE(0, &rv32m1_intmux_init, device_pm_control_nop, NULL,
&rv32m1_intmux_cfg, PRE_KERNEL_1,
CONFIG_RV32M1_INTMUX_INIT_PRIORITY, &rv32m1_intmux_apis);