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>
This commit is contained in:
Pieter De Gendt 2025-06-27 11:02:24 +02:00 committed by Daniel DeGrasse
parent 8e2405207e
commit c57d76e1e5
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ static int counter_cc23x0_lgpt_stop(const struct device *dev)
return 0;
}
static const struct counter_driver_api cc23x0_lgpt_api = {
static DEVICE_API(counter, cc23x0_lgpt_api) = {
.start = counter_cc23x0_lgpt_start,
.stop = counter_cc23x0_lgpt_stop,
.get_value = counter_cc23x0_lgpt_get_value,

View File

@ -208,7 +208,7 @@ static int counter_cc23x0_init(const struct device *dev)
return 0;
}
static const struct counter_driver_api rtc_cc23x0_api = {
static DEVICE_API(counter, rtc_cc23x0_api) = {
.start = counter_cc23x0_start,
.stop = counter_cc23x0_stop,
.get_value = counter_cc23x0_get_value,