Skip to content

Commit 454cc58

Browse files
pdgendtfabiobaltieri
authored andcommitted
drivers: dac: Place API into iterable section
Add wrapper DEVICE_API macro to all dac_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 866e690 commit 454cc58

19 files changed

+19
-19
lines changed

drivers/dac/dac_ad559x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int dac_ad559x_write_value(const struct device *dev, uint8_t channel, uin
8080
}
8181
}
8282

83-
static const struct dac_driver_api dac_ad559x_api = {
83+
static DEVICE_API(dac, dac_ad559x_api) = {
8484
.channel_setup = dac_ad559x_channel_setup,
8585
.write_value = dac_ad559x_write_value,
8686
};

drivers/dac/dac_ad569x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static int ad569x_init(const struct device *dev)
160160
return 0;
161161
}
162162

163-
static const struct dac_driver_api ad569x_driver_api = {
163+
static DEVICE_API(dac, ad569x_driver_api) = {
164164
.channel_setup = ad569x_channel_setup,
165165
.write_value = ad569x_write_value,
166166
};

drivers/dac/dac_ad56xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static int ad56xx_init(const struct device *dev)
159159
return 0;
160160
}
161161

162-
static const struct dac_driver_api ad56xx_driver_api = {
162+
static DEVICE_API(dac, ad56xx_driver_api) = {
163163
.channel_setup = ad56xx_channel_setup,
164164
.write_value = ad56xx_write_value,
165165
};

drivers/dac/dac_dacx0501.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static int dacx0501_init(const struct device *dev)
174174
return 0;
175175
}
176176

177-
static const struct dac_driver_api dacx0501_driver_api = {
177+
static DEVICE_API(dac, dacx0501_driver_api) = {
178178
.channel_setup = dacx0501_channel_setup,
179179
.write_value = dacx0501_write_value,
180180
};

drivers/dac/dac_dacx0508.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static int dacx0508_init(const struct device *dev)
361361
return 0;
362362
}
363363

364-
static const struct dac_driver_api dacx0508_driver_api = {
364+
static DEVICE_API(dac, dacx0508_driver_api) = {
365365
.channel_setup = dacx0508_channel_setup,
366366
.write_value = dacx0508_write_value,
367367
};

drivers/dac/dac_dacx3608.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static int dacx3608_init(const struct device *dev)
246246
return 0;
247247
}
248248

249-
static const struct dac_driver_api dacx3608_driver_api = {
249+
static DEVICE_API(dac, dacx3608_driver_api) = {
250250
.channel_setup = dacx3608_channel_setup,
251251
.write_value = dacx3608_write_value,
252252
};

drivers/dac/dac_esp32.c

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

79-
static const struct dac_driver_api dac_esp32_driver_api = {
79+
static DEVICE_API(dac, dac_esp32_driver_api) = {
8080
.channel_setup = dac_esp32_channel_setup,
8181
.write_value = dac_esp32_write_value
8282
};

drivers/dac/dac_gd32.c

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

147-
struct dac_driver_api dac_gd32_driver_api = {
147+
DEVICE_API(dac, dac_gd32_driver_api) = {
148148
.channel_setup = dac_gd32_channel_setup,
149149
.write_value = dac_gd32_write_value
150150
};

drivers/dac/dac_ltc166x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static int ltc166x_init(const struct device *dev)
103103
return 0;
104104
}
105105

106-
static const struct dac_driver_api ltc166x_driver_api = {
106+
static DEVICE_API(dac, ltc166x_driver_api) = {
107107
.channel_setup = ltc166x_channel_setup,
108108
.write_value = ltc166x_write_value,
109109
};

drivers/dac/dac_mcp4725.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int dac_mcp4725_init(const struct device *dev)
129129
return 0;
130130
}
131131

132-
static const struct dac_driver_api mcp4725_driver_api = {
132+
static DEVICE_API(dac, mcp4725_driver_api) = {
133133
.channel_setup = mcp4725_channel_setup,
134134
.write_value = mcp4725_write_value,
135135
};

0 commit comments

Comments
 (0)