Skip to content

Commit efecfe2

Browse files
pdgendtdanieldegrasse
authored andcommitted
drivers: adc: 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 bd2b7d8 commit efecfe2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/adc/adc_cc23x0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ static int adc_cc23x0_init(const struct device *dev)
497497
return 0;
498498
}
499499

500-
static const struct adc_driver_api adc_cc23x0_driver_api = {
500+
static DEVICE_API(adc, adc_cc23x0_driver_api) = {
501501
.channel_setup = adc_cc23x0_channel_setup,
502502
.read = adc_cc23x0_read,
503503
#ifdef CONFIG_ADC_ASYNC

drivers/adc/adc_ch32v00x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static int adc_ch32v00x_init(const struct device *dev)
143143
#define ADC_CH32V00X_DEVICE(n) \
144144
PINCTRL_DT_INST_DEFINE(n); \
145145
\
146-
static const struct adc_driver_api adc_ch32v00x_api_##n = { \
146+
static DEVICE_API(adc, adc_ch32v00x_api_##n) = { \
147147
.channel_setup = adc_ch32v00x_channel_setup, \
148148
.read = adc_ch32v00x_read, \
149149
.ref_internal = DT_INST_PROP(n, vref_mv), \

0 commit comments

Comments
 (0)