Skip to content

Commit

Permalink
drivers: bbram: Place API into iterable section
Browse files Browse the repository at this point in the history
Add wrapper DEVICE_API macro to all bbram_driver_api instances.

Signed-off-by: Pieter De Gendt <[email protected]>
  • Loading branch information
pdgendt authored and kartben committed Dec 6, 2024
1 parent 765b3aa commit 2b92fe2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/bbram/bbram_emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static int bbram_emul_write(const struct device *dev, size_t offset, size_t size
return 0;
}

static const struct bbram_driver_api bbram_emul_driver_api = {
static DEVICE_API(bbram, bbram_emul_driver_api) = {
.check_invalid = bbram_emul_check_invalid,
.check_standby_power = bbram_emul_check_standby_power,
.check_power = bbram_emul_check_power,
Expand Down
2 changes: 1 addition & 1 deletion drivers/bbram/bbram_it8xxx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static int bbram_it8xxx2_size(const struct device *dev, size_t *size)
return 0;
}

static const struct bbram_driver_api bbram_it8xxx2_driver_api = {
static DEVICE_API(bbram, bbram_it8xxx2_driver_api) = {
.read = bbram_it8xxx2_read,
.write = bbram_it8xxx2_write,
.get_size = bbram_it8xxx2_size,
Expand Down
2 changes: 1 addition & 1 deletion drivers/bbram/bbram_microchip_mcp7940n.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static int microchip_mcp7940n_bbram_write(const struct device *dev, size_t offse
return rc;
}

static const struct bbram_driver_api microchip_mcp7940n_bbram_api = {
static DEVICE_API(bbram, microchip_mcp7940n_bbram_api) = {
.get_size = microchip_mcp7940n_bbram_size,
.check_invalid = microchip_mcp7940n_bbram_is_invalid,
.check_standby_power = microchip_mcp7940n_bbram_check_standby_power,
Expand Down
2 changes: 1 addition & 1 deletion drivers/bbram/bbram_npcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int bbram_npcx_write(const struct device *dev, size_t offset, size_t size
return 0;
}

static const struct bbram_driver_api bbram_npcx_driver_api = {
static DEVICE_API(bbram, bbram_npcx_driver_api) = {
.check_invalid = bbram_npcx_check_invalid,
.check_standby_power = bbram_npcx_check_standby_power,
.check_power = bbram_npcx_check_power,
Expand Down
2 changes: 1 addition & 1 deletion drivers/bbram/bbram_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int bbram_stm32_get_size(const struct device *dev, size_t *size)
return 0;
}

static const struct bbram_driver_api bbram_stm32_driver_api = {
static DEVICE_API(bbram, bbram_stm32_driver_api) = {
.read = bbram_stm32_read,
.write = bbram_stm32_write,
.get_size = bbram_stm32_get_size,
Expand Down
2 changes: 1 addition & 1 deletion drivers/bbram/bbram_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int bbram_xec_write(const struct device *dev, size_t offset, size_t size,
return 0;
}

static const struct bbram_driver_api bbram_xec_driver_api = {
static DEVICE_API(bbram, bbram_xec_driver_api) = {
.check_invalid = bbram_xec_check_invalid,
.get_size = bbram_xec_get_size,
.read = bbram_xec_read,
Expand Down

0 comments on commit 2b92fe2

Please sign in to comment.