Browse Source

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>
pull/85684/head
Pieter De Gendt 5 months ago committed by Benjamin Cabé
parent
commit
f13643ebbd
  1. 2
      drivers/flash/flash_andes_qspi.c
  2. 2
      drivers/flash/soc_flash_cc23x0.c

2
drivers/flash/flash_andes_qspi.c

@ -902,7 +902,7 @@ flash_andes_qspi_get_parameters(const struct device *dev) @@ -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,

2
drivers/flash/soc_flash_cc23x0.c

@ -223,7 +223,7 @@ static void flash_cc23x0_layout(const struct device *dev, const struct flash_pag @@ -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,

Loading…
Cancel
Save