Skip to content

Commit c57d76e

Browse files
pdgendtdanieldegrasse
authored andcommitted
drivers: counter: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 8e24052 commit c57d76e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/counter/counter_cc23x0_lgpt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static int counter_cc23x0_lgpt_stop(const struct device *dev)
243243
return 0;
244244
}
245245

246-
static const struct counter_driver_api cc23x0_lgpt_api = {
246+
static DEVICE_API(counter, cc23x0_lgpt_api) = {
247247
.start = counter_cc23x0_lgpt_start,
248248
.stop = counter_cc23x0_lgpt_stop,
249249
.get_value = counter_cc23x0_lgpt_get_value,

drivers/counter/counter_cc23x0_rtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static int counter_cc23x0_init(const struct device *dev)
208208
return 0;
209209
}
210210

211-
static const struct counter_driver_api rtc_cc23x0_api = {
211+
static DEVICE_API(counter, rtc_cc23x0_api) = {
212212
.start = counter_cc23x0_start,
213213
.stop = counter_cc23x0_stop,
214214
.get_value = counter_cc23x0_get_value,

0 commit comments

Comments
 (0)