drivers: interrupt_controller: drop DEV_DATA/DEV_CFG usage
Stop using redundant DEV_DATA/DEV_CFG macros and use dev->data and dev->config instead. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
72a0d68284
commit
c2078bd3d0
2 changed files with 5 additions and 10 deletions
|
@ -45,10 +45,7 @@ struct rv32m1_intmux_config {
|
|||
struct _isr_table_entry *isr_base;
|
||||
};
|
||||
|
||||
#define DEV_CFG(dev) \
|
||||
((struct rv32m1_intmux_config *)(dev->config))
|
||||
|
||||
#define DEV_REGS(dev) (DEV_CFG(dev)->regs)
|
||||
#define DEV_REGS(dev) (((const struct rv32m1_intmux_config *)(dev->config))->regs)
|
||||
|
||||
/*
|
||||
* <irq_nextlevel.h> API
|
||||
|
@ -110,10 +107,11 @@ static int rv32m1_intmux_get_line_state(const struct device *dev,
|
|||
static void rv32m1_intmux_isr(const void *arg)
|
||||
{
|
||||
const struct device *dev = DEVICE_DT_INST_GET(0);
|
||||
const struct rv32m1_intmux_config *config = dev->config;
|
||||
INTMUX_Type *regs = DEV_REGS(dev);
|
||||
uint32_t channel = POINTER_TO_UINT(arg);
|
||||
uint32_t line = (regs->CHANNEL[channel].CHn_VEC >> 2);
|
||||
struct _isr_table_entry *isr_base = DEV_CFG(dev)->isr_base;
|
||||
struct _isr_table_entry *isr_base = config->isr_base;
|
||||
struct _isr_table_entry *entry;
|
||||
|
||||
/*
|
||||
|
@ -152,7 +150,7 @@ static const struct rv32m1_intmux_config rv32m1_intmux_cfg = {
|
|||
|
||||
static int rv32m1_intmux_init(const struct device *dev)
|
||||
{
|
||||
const struct rv32m1_intmux_config *config = DEV_CFG(dev);
|
||||
const struct rv32m1_intmux_config *config = dev->config;
|
||||
INTMUX_Type *regs = DEV_REGS(dev);
|
||||
size_t i;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue