Skip to content

Commit a1d188a

Browse files
committed
soc: Switching DEVICE_<DT/DT_INST>_DEFINE macros to new ones
Switching to DEVICE_INSTANCE and DEVICE_INSTANCE_FROM_DT_INST, thus merging former DEVICE_DEFINE and DEVICE_DT_DEFINE into one, so removing the name parameter from the earier and finally removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent cc698fb commit a1d188a

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

soc/intel/intel_adsp/common/mem_window.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ void mem_window_idle_exit(void)
5454
.mem_base = DT_REG_ADDR(DT_PHANDLE(MEM_WINDOW_NODE(n), memory)) + WIN_OFFSET(n), \
5555
.initialize = DT_PROP(MEM_WINDOW_NODE(n), initialize), \
5656
}; \
57-
DEVICE_DT_DEFINE(MEM_WINDOW_NODE(n), mem_win_init, NULL, NULL, \
57+
DEVICE_INSTANCE(MEM_WINDOW_NODE(n), mem_win_init, NULL, NULL, \
5858
&mem_win_config_##n, PRE_KERNEL_1, \
59-
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
59+
NULL);
6060

6161
#if DT_NODE_HAS_STATUS_OKAY(MEM_WINDOW_NODE(0))
6262
MEM_WINDOW_DEFINE(0)

soc/ite/ec/it8xxx2/ilm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,4 @@ static const struct ilm_config ilm_config = {
208208
BUILD_ASSERT(ARRAY_SIZE(ilm_config.scar_regs) * ILM_BLOCK_SIZE == KB(CONFIG_ILM_MAX_SIZE),
209209
"Wrong number of SCAR registers defined for RAM size");
210210

211-
DEVICE_DT_DEFINE(ILM_NODE, &it8xxx2_ilm_init, NULL, NULL, &ilm_config, PRE_KERNEL_1, 0, NULL);
211+
DEVICE_INSTANCE(ILM_NODE, &it8xxx2_ilm_init, NULL, NULL, &ilm_config, PRE_KERNEL_1, NULL);

soc/mediatek/mtk_adsp/mbox.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ SYS_INIT(mbox_init, POST_KERNEL, 0);
124124
static struct mbox_data dev_data##N; \
125125
static const struct mbox_cfg dev_cfg##N = \
126126
{ .irq = DT_INST_IRQN(N), .mbox = (void *)DT_INST_REG_ADDR(N), }; \
127-
DEVICE_DT_INST_DEFINE(N, NULL, NULL, &dev_data##N, &dev_cfg##N, \
128-
POST_KERNEL, 0, NULL);
127+
DEVICE_INSTANCE_FROM_DT_INST(N, NULL, NULL, &dev_data##N, &dev_cfg##N,\
128+
POST_KERNEL, NULL);
129129

130130
DT_INST_FOREACH_STATUS_OKAY(DEF_DEV)

soc/nxp/s32/common/mc_rgm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ static int mc_rgm_init(const struct device *dev)
119119
return err;
120120
}
121121

122-
DEVICE_DT_INST_DEFINE(0, mc_rgm_init, NULL, NULL, 0, PRE_KERNEL_1, 1, NULL);
122+
DEVICE_INSTANCE_FROM_DT_INST(0, mc_rgm_init, NULL, NULL, 0, PRE_KERNEL_1, NULL);

soc/nxp/s32/s32k3/pmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ static int pmc_init(const struct device *dev)
133133
return 0;
134134
}
135135

136-
DEVICE_DT_INST_DEFINE(0, pmc_init, NULL, NULL, 0, PRE_KERNEL_1, 1, NULL);
136+
DEVICE_INSTANCE_FROM_DT_INST(0, pmc_init, NULL, NULL, 0, PRE_KERNEL_1, NULL);

soc/st/stm32/common/stm32_backup_sram.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ static const struct stm32_backup_sram_config config = {
5858
.enr = DT_INST_CLOCKS_CELL(0, bits) },
5959
};
6060

61-
DEVICE_DT_INST_DEFINE(0, stm32_backup_sram_init, NULL, NULL, &config,
62-
POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY, NULL);
61+
DEVICE_INSTANCE_FROM_DT_INST(0, stm32_backup_sram_init, NULL, NULL, &config,
62+
POST_KERNEL, NULL);

0 commit comments

Comments
 (0)