Skip to content

Commit a553af7

Browse files
pdgendtfabiobaltieri
authored andcommitted
drivers: sensor: Place API into iterable section
Add wrapper DEVICE_API macro to all sensor_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 8c9a2b2 commit a553af7

File tree

205 files changed

+227
-215
lines changed

Some content is hidden

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

205 files changed

+227
-215
lines changed

drivers/sensor/a01nyub/a01nyub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static int a01nyub_sample_fetch(const struct device *dev, enum sensor_channel ch
114114
return -ENOTSUP;
115115
}
116116

117-
static const struct sensor_driver_api a01nyub_api_funcs = {
117+
static DEVICE_API(sensor, a01nyub_api_funcs) = {
118118
.sample_fetch = a01nyub_sample_fetch,
119119
.channel_get = a01nyub_channel_get,
120120
};

drivers/sensor/adi/adltc2990/adltc2990.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ static int adltc2990_channel_get(const struct device *dev, enum sensor_channel c
505505
return 0;
506506
}
507507

508-
static const struct sensor_driver_api adltc2990_driver_api = {
508+
static DEVICE_API(sensor, adltc2990_driver_api) = {
509509
.sample_fetch = adltc2990_sample_fetch,
510510
.channel_get = adltc2990_channel_get,
511511
};

drivers/sensor/adi/adt7310/adt7310.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int adt7310_init(const struct device *dev)
276276
return ret;
277277
}
278278

279-
static const struct sensor_driver_api adt7310_driver_api = {
279+
static DEVICE_API(sensor, adt7310_driver_api) = {
280280
.attr_set = adt7310_attr_set,
281281
.sample_fetch = adt7310_sample_fetch,
282282
.channel_get = adt7310_channel_get,

drivers/sensor/adi/adt7420/adt7420.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int adt7420_channel_get(const struct device *dev,
144144
return 0;
145145
}
146146

147-
static const struct sensor_driver_api adt7420_driver_api = {
147+
static DEVICE_API(sensor, adt7420_driver_api) = {
148148
.attr_set = adt7420_attr_set,
149149
.sample_fetch = adt7420_sample_fetch,
150150
.channel_get = adt7420_channel_get,

drivers/sensor/adi/adxl345/adxl345.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static int adxl345_channel_get(const struct device *dev,
383383
return 0;
384384
}
385385

386-
static const struct sensor_driver_api adxl345_api_funcs = {
386+
static DEVICE_API(sensor, adxl345_api_funcs) = {
387387
.attr_set = adxl345_attr_set,
388388
.sample_fetch = adxl345_sample_fetch,
389389
.channel_get = adxl345_channel_get,

drivers/sensor/adi/adxl362/adxl362.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ static int adxl362_channel_get(const struct device *dev,
654654
return 0;
655655
}
656656

657-
static const struct sensor_driver_api adxl362_api_funcs = {
657+
static DEVICE_API(sensor, adxl362_api_funcs) = {
658658
.attr_set = adxl362_attr_set,
659659
.sample_fetch = adxl362_sample_fetch,
660660
.channel_get = adxl362_channel_get,

drivers/sensor/adi/adxl367/adxl367.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ static int adxl367_channel_get(const struct device *dev,
940940
return 0;
941941
}
942942

943-
static const struct sensor_driver_api adxl367_api_funcs = {
943+
static DEVICE_API(sensor, adxl367_api_funcs) = {
944944
.attr_set = adxl367_attr_set,
945945
.sample_fetch = adxl367_sample_fetch,
946946
.channel_get = adxl367_channel_get,

drivers/sensor/adi/adxl372/adxl372.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ static int adxl372_channel_get(const struct device *dev,
692692
return 0;
693693
}
694694

695-
static const struct sensor_driver_api adxl372_api_funcs = {
695+
static DEVICE_API(sensor, adxl372_api_funcs) = {
696696
.attr_set = adxl372_attr_set,
697697
.sample_fetch = adxl372_sample_fetch,
698698
.channel_get = adxl372_channel_get,

drivers/sensor/amd_sb_tsi/sb_tsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static int sb_tsi_channel_get(const struct device *dev,
7676
return 0;
7777
}
7878

79-
static const struct sensor_driver_api sb_tsi_driver_api = {
79+
static DEVICE_API(sensor, sb_tsi_driver_api) = {
8080
.sample_fetch = sb_tsi_sample_fetch,
8181
.channel_get = sb_tsi_channel_get,
8282
};

drivers/sensor/amg88xx/amg88xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int amg88xx_init(const struct device *dev)
127127
return 0;
128128
}
129129

130-
static const struct sensor_driver_api amg88xx_driver_api = {
130+
static DEVICE_API(sensor, amg88xx_driver_api) = {
131131
#ifdef CONFIG_AMG88XX_TRIGGER
132132
.attr_set = amg88xx_attr_set,
133133
.trigger_set = amg88xx_trigger_set,

0 commit comments

Comments
 (0)