Skip to content

Commit 5c0422c

Browse files
committed
drivers/smbus: Switching SMBUS_DEVICE_DT_DEFINE macros to new ones
Switching to SMBUS_DEVICE_INSTANCE and SMBUS_DEVICE_INSTANCE_FROM_DT_INST relevantly. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent a7dd9ee commit 5c0422c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

drivers/smbus/intel_pch_smbus.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,10 +1018,9 @@ static void smbus_isr(const struct device *dev)
10181018
.config_func = pch_config_##n, \
10191019
}; \
10201020
static struct pch_data smbus_##n##_data; \
1021-
SMBUS_DEVICE_DT_INST_DEFINE(n, pch_smbus_init, NULL, \
1021+
SMBUS_DEVICE_INSTANCE_FROM_DT_INST(n, pch_smbus_init, NULL, \
10221022
&smbus_##n##_data, &pch_config_data_##n, \
1023-
POST_KERNEL, CONFIG_SMBUS_INIT_PRIORITY, \
1024-
&funcs); \
1023+
POST_KERNEL, &funcs); \
10251024
SMBUS_IRQ_CONFIG(n);
10261025

10271026
DT_INST_FOREACH_STATUS_OKAY(SMBUS_DEVICE_INIT)

drivers/smbus/smbus_stm32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ static const struct smbus_driver_api smbus_stm32_api = {
283283
\
284284
static struct smbus_stm32_data smbus_stm32_data_##n; \
285285
\
286-
SMBUS_DEVICE_DT_INST_DEFINE(n, smbus_stm32_init, NULL, &smbus_stm32_data_##n, \
286+
SMBUS_DEVICE_INSTANCE_FROM_DT_INST(n, smbus_stm32_init, NULL, &smbus_stm32_data_##n, \
287287
&smbus_stm32_config_##n, POST_KERNEL, \
288-
CONFIG_SMBUS_INIT_PRIORITY, &smbus_stm32_api);
288+
&smbus_stm32_api);
289289

290290
DT_INST_FOREACH_STATUS_OKAY(SMBUS_STM32_DEVICE_INIT)

0 commit comments

Comments
 (0)