drivers: flash: Wrap driver instances in device API macro

Use the device API macro to place the driver API instance into an iterable
section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2025-02-12 09:25:43 +01:00 committed by Benjamin Cabé
commit f13643ebbd
2 changed files with 2 additions and 2 deletions

View file

@ -902,7 +902,7 @@ flash_andes_qspi_get_parameters(const struct device *dev)
return &config->parameters;
}
static const struct flash_driver_api flash_andes_qspi_api = {
static DEVICE_API(flash, flash_andes_qspi_api) = {
.read = flash_andes_qspi_read,
.write = flash_andes_qspi_write,
.erase = flash_andes_qspi_erase,

View file

@ -223,7 +223,7 @@ static void flash_cc23x0_layout(const struct device *dev, const struct flash_pag
}
#endif /* CONFIG_FLASH_PAGE_LAYOUT */
static const struct flash_driver_api flash_cc23x0_api = {
static DEVICE_API(flash, flash_cc23x0_api) = {
.erase = flash_cc23x0_erase,
.write = flash_cc23x0_write,
.read = flash_cc23x0_read,