Skip to content

Commit 9dd07da

Browse files
pdgendtfabiobaltieri
authored andcommitted
drivers: flash: Place API into iterable section
Add wrapper DEVICE_API macro to all flash_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent a872747 commit 9dd07da

Some content is hidden

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

49 files changed

+58
-57
lines changed

drivers/flash/flash_ambiq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static void flash_ambiq_pages_layout(const struct device *dev,
211211
}
212212
#endif /* CONFIG_FLASH_PAGE_LAYOUT */
213213

214-
static const struct flash_driver_api flash_ambiq_driver_api = {
214+
static DEVICE_API(flash, flash_ambiq_driver_api) = {
215215
.read = flash_ambiq_read,
216216
.write = flash_ambiq_write,
217217
.erase = flash_ambiq_erase,

drivers/flash/flash_andes_qspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ flash_andes_qspi_get_parameters(const struct device *dev)
880880
return &config->parameters;
881881
}
882882

883-
static const struct flash_driver_api flash_andes_qspi_api = {
883+
static DEVICE_API(flash, flash_andes_qspi_api) = {
884884
.read = flash_andes_qspi_read,
885885
.write = flash_andes_qspi_write,
886886
.erase = flash_andes_qspi_erase,

drivers/flash/flash_cadence_nand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static const struct flash_parameters *flash_cdns_get_parameters(const struct dev
143143

144144
return &flash_cdns_parameters;
145145
}
146-
static const struct flash_driver_api flash_cdns_nand_api = {
146+
static DEVICE_API(flash, flash_cdns_nand_api) = {
147147
.erase = flash_cdns_nand_erase,
148148
.write = flash_cdns_nand_write,
149149
.read = flash_cdns_nand_read,

drivers/flash/flash_cadence_qspi_nor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ flash_cad_get_parameters(const struct device *dev)
109109
return &flash_cad_parameters;
110110
}
111111

112-
static const struct flash_driver_api flash_cad_api = {
112+
static DEVICE_API(flash, flash_cad_api) = {
113113
.erase = flash_cad_erase,
114114
.write = flash_cad_write,
115115
.read = flash_cad_read,

drivers/flash/flash_esp32.c

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

164-
static const struct flash_driver_api flash_esp32_driver_api = {
164+
static DEVICE_API(flash, flash_esp32_driver_api) = {
165165
.read = flash_esp32_read,
166166
.write = flash_esp32_write,
167167
.erase = flash_esp32_erase,

drivers/flash/flash_gd32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ flash_gd32_get_parameters(const struct device *dev)
9898
return &flash_gd32_parameters;
9999
}
100100

101-
static const struct flash_driver_api flash_gd32_driver_api = {
101+
static DEVICE_API(flash, flash_gd32_driver_api) = {
102102
.read = flash_gd32_read,
103103
.write = flash_gd32_write,
104104
.erase = flash_gd32_erase,

drivers/flash/flash_gecko.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static int flash_gecko_init(const struct device *dev)
216216
return 0;
217217
}
218218

219-
static const struct flash_driver_api flash_gecko_driver_api = {
219+
static DEVICE_API(flash, flash_gecko_driver_api) = {
220220
.read = flash_gecko_read,
221221
.write = flash_gecko_write,
222222
.erase = flash_gecko_erase,

drivers/flash/flash_hp_ra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void flash_ra_page_layout(const struct device *dev, const struct flash_pages_lay
5151
static int flash_ra_ex_op(const struct device *dev, uint16_t code, const uintptr_t in, void *out);
5252
#endif
5353

54-
static const struct flash_driver_api flash_ra_api = {
54+
static DEVICE_API(flash, flash_ra_api) = {
5555
.erase = flash_ra_erase,
5656
.write = flash_ra_write,
5757
.read = flash_ra_read,

drivers/flash/flash_ifx_cat1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int ifx_cat1_flash_init(const struct device *dev)
184184
return 0;
185185
}
186186

187-
static const struct flash_driver_api ifx_cat1_flash_driver_api = {
187+
static DEVICE_API(flash, ifx_cat1_flash_driver_api) = {
188188
.read = ifx_cat1_flash_read,
189189
.write = ifx_cat1_flash_write,
190190
.erase = ifx_cat1_flash_erase,

drivers/flash/flash_ifx_cat1_qspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static int ifx_cat1_flash_init(const struct device *dev)
326326
return 0;
327327
}
328328

329-
static const struct flash_driver_api ifx_cat1_flash_driver_api = {
329+
static DEVICE_API(flash, ifx_cat1_flash_driver_api) = {
330330
.read = ifx_cat1_flash_read,
331331
.write = ifx_cat1_flash_write,
332332
.erase = ifx_cat1_flash_erase,

0 commit comments

Comments
 (0)