Skip to content

Commit 1cab0e3

Browse files
committed
sensors: Switching SENSOR_DEVICE_<DT/DT_INST>_DEFINE macros to new ones
Switching to SENSOR_DEVICE_INSTANCE and SENSOR_DEVICE_INSTANCE_FROM_DT_INST, thus removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent 55d1d4f commit 1cab0e3

File tree

196 files changed

+377
-461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+377
-461
lines changed

drivers/sensor/a01nyub/a01nyub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ static int a01nyub_init(const struct device *dev)
204204
.cb = a01nyub_uart_isr, \
205205
}; \
206206
\
207-
SENSOR_DEVICE_DT_INST_DEFINE(inst, a01nyub_init, NULL, \
207+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, a01nyub_init, NULL, \
208208
&a01nyub_data_##inst, &a01nyub_cfg_##inst, \
209-
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &a01nyub_api_funcs);
209+
POST_KERNEL, &a01nyub_api_funcs);
210210

211211
DT_INST_FOREACH_STATUS_OKAY(A01NYUB_INIT)

drivers/sensor/adi/adltc2990/adltc2990.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,8 @@ static const struct sensor_driver_api adltc2990_driver_api = {
530530
.pins_v3_v4.voltage_divider_resistors.v4_r1_r2 = \
531531
DT_INST_PROP_OR(inst, pin_v4_voltage_divider_resistors, NULL)}; \
532532
\
533-
SENSOR_DEVICE_DT_INST_DEFINE(inst, adltc2990_init, NULL, &adltc2990_data_##inst, \
533+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, adltc2990_init, NULL, &adltc2990_data_##inst, \
534534
&adltc2990_config_##inst, POST_KERNEL, \
535-
CONFIG_SENSOR_INIT_PRIORITY, &adltc2990_driver_api);
535+
&adltc2990_driver_api);
536536

537537
DT_INST_FOREACH_STATUS_OKAY(ADLTC2990_DEFINE)

drivers/sensor/adi/adt7310/adt7310.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ static const struct sensor_driver_api adt7310_driver_api = {
296296
IF_ENABLED(CONFIG_ADT7310_TRIGGER, \
297297
(.int_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, int_gpios, {0}),))}; \
298298
\
299-
SENSOR_DEVICE_DT_INST_DEFINE(inst, adt7310_init, NULL, &adt7310_data_##inst, \
299+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, adt7310_init, NULL, &adt7310_data_##inst, \
300300
&adt7310_config_##inst, POST_KERNEL, \
301-
CONFIG_SENSOR_INIT_PRIORITY, &adt7310_driver_api);
301+
&adt7310_driver_api);
302302

303303
DT_INST_FOREACH_STATUS_OKAY(ADT7310_DEFINE)

drivers/sensor/adi/adt7420/adt7420.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ static int adt7420_init(const struct device *dev)
222222
(.int_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, int_gpios, { 0 }),)) \
223223
}; \
224224
\
225-
SENSOR_DEVICE_DT_INST_DEFINE(inst, adt7420_init, NULL, &adt7420_data_##inst, \
225+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, adt7420_init, NULL, &adt7420_data_##inst,\
226226
&adt7420_config_##inst, POST_KERNEL, \
227-
CONFIG_SENSOR_INIT_PRIORITY, &adt7420_driver_api); \
227+
&adt7420_driver_api); \
228228

229229
DT_INST_FOREACH_STATUS_OKAY(ADT7420_DEFINE)

drivers/sensor/adi/adxl345/adxl345.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,8 @@ static int adxl345_init(const struct device *dev)
565565
COND_CODE_1(DT_INST_ON_BUS(inst, spi), (ADXL345_CONFIG_SPI(inst)), \
566566
(ADXL345_CONFIG_I2C(inst))); \
567567
\
568-
SENSOR_DEVICE_DT_INST_DEFINE(inst, adxl345_init, NULL, \
568+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, adxl345_init, NULL, \
569569
&adxl345_data_##inst, &adxl345_config_##inst, POST_KERNEL,\
570-
CONFIG_SENSOR_INIT_PRIORITY, &adxl345_api_funcs); \
570+
&adxl345_api_funcs); \
571571

572572
DT_INST_FOREACH_STATUS_OKAY(ADXL345_DEFINE)

drivers/sensor/adi/adxl362/adxl362.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,8 @@ static int adxl362_init(const struct device *dev)
836836
(.interrupt = GPIO_DT_SPEC_INST_GET_OR(inst, int1_gpios, { 0 }),)) \
837837
}; \
838838
\
839-
SENSOR_DEVICE_DT_INST_DEFINE(inst, adxl362_init, NULL, &adxl362_data_##inst, \
839+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, adxl362_init, NULL, &adxl362_data_##inst, \
840840
&adxl362_config_##inst, POST_KERNEL, \
841-
CONFIG_SENSOR_INIT_PRIORITY, &adxl362_api_funcs); \
841+
&adxl362_api_funcs); \
842842

843843
DT_INST_FOREACH_STATUS_OKAY(ADXL362_DEFINE)

drivers/sensor/adi/adxl367/adxl367.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,13 +1084,12 @@ static int adxl367_init(const struct device *dev)
10841084
*/
10851085

10861086
#define ADXL367_DEVICE_INIT(inst) \
1087-
SENSOR_DEVICE_DT_INST_DEFINE(inst, \
1087+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, \
10881088
adxl367_init, \
10891089
NULL, \
10901090
&adxl367_data_##inst, \
10911091
&adxl367_config_##inst, \
10921092
POST_KERNEL, \
1093-
CONFIG_SENSOR_INIT_PRIORITY, \
10941093
&adxl367_api_funcs);
10951094

10961095
#ifdef CONFIG_ADXL367_TRIGGER

drivers/sensor/adi/adxl372/adxl372.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,13 +856,12 @@ static int adxl372_init(const struct device *dev)
856856
*/
857857

858858
#define ADXL372_DEVICE_INIT(inst) \
859-
SENSOR_DEVICE_DT_INST_DEFINE(inst, \
859+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, \
860860
adxl372_init, \
861861
NULL, \
862862
&adxl372_data_##inst, \
863863
&adxl372_config_##inst, \
864864
POST_KERNEL, \
865-
CONFIG_SENSOR_INIT_PRIORITY, \
866865
&adxl372_api_funcs);
867866

868867
/*

drivers/sensor/amd_sb_tsi/sb_tsi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ static int sb_tsi_pm_action(const struct device *dev, enum pm_device_action acti
124124
.i2c = I2C_DT_SPEC_INST_GET(inst), \
125125
}; \
126126
PM_DEVICE_DT_INST_DEFINE(inst, sb_tsi_pm_action); \
127-
SENSOR_DEVICE_DT_INST_DEFINE(inst, sb_tsi_init, PM_DEVICE_DT_INST_GET(inst), \
127+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, sb_tsi_init, PM_DEVICE_DT_INST_GET(inst),\
128128
&sb_tsi_data_##inst, &sb_tsi_config_##inst, POST_KERNEL, \
129-
CONFIG_SENSOR_INIT_PRIORITY, &sb_tsi_driver_api);
129+
&sb_tsi_driver_api);
130130

131131
DT_INST_FOREACH_STATUS_OKAY(SB_TSI_INST)

drivers/sensor/amg88xx/amg88xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ static const struct sensor_driver_api amg88xx_driver_api = {
145145
(.int_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, int_gpios, { 0 }),)) \
146146
}; \
147147
\
148-
SENSOR_DEVICE_DT_INST_DEFINE(inst, amg88xx_init, NULL, \
148+
SENSOR_DEVICE_INSTANCE_FROM_DT_INST(inst, amg88xx_init, NULL, \
149149
&amg88xx_data_##inst, &amg88xx_config_##inst, POST_KERNEL, \
150-
CONFIG_SENSOR_INIT_PRIORITY, &amg88xx_driver_api); \
150+
&amg88xx_driver_api); \
151151

152152
DT_INST_FOREACH_STATUS_OKAY(AMG88XX_DEFINE)

0 commit comments

Comments
 (0)