Skip to content

Commit 2b92fe2

Browse files
pdgendtkartben
authored andcommitted
drivers: bbram: Place API into iterable section
Add wrapper DEVICE_API macro to all bbram_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 765b3aa commit 2b92fe2

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

drivers/bbram/bbram_emul.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static int bbram_emul_write(const struct device *dev, size_t offset, size_t size
119119
return 0;
120120
}
121121

122-
static const struct bbram_driver_api bbram_emul_driver_api = {
122+
static DEVICE_API(bbram, bbram_emul_driver_api) = {
123123
.check_invalid = bbram_emul_check_invalid,
124124
.check_standby_power = bbram_emul_check_standby_power,
125125
.check_power = bbram_emul_check_power,

drivers/bbram/bbram_it8xxx2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int bbram_it8xxx2_size(const struct device *dev, size_t *size)
6767
return 0;
6868
}
6969

70-
static const struct bbram_driver_api bbram_it8xxx2_driver_api = {
70+
static DEVICE_API(bbram, bbram_it8xxx2_driver_api) = {
7171
.read = bbram_it8xxx2_read,
7272
.write = bbram_it8xxx2_write,
7373
.get_size = bbram_it8xxx2_size,

drivers/bbram/bbram_microchip_mcp7940n.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static int microchip_mcp7940n_bbram_write(const struct device *dev, size_t offse
212212
return rc;
213213
}
214214

215-
static const struct bbram_driver_api microchip_mcp7940n_bbram_api = {
215+
static DEVICE_API(bbram, microchip_mcp7940n_bbram_api) = {
216216
.get_size = microchip_mcp7940n_bbram_size,
217217
.check_invalid = microchip_mcp7940n_bbram_is_invalid,
218218
.check_standby_power = microchip_mcp7940n_bbram_check_standby_power,

drivers/bbram/bbram_npcx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int bbram_npcx_write(const struct device *dev, size_t offset, size_t size
9090
return 0;
9191
}
9292

93-
static const struct bbram_driver_api bbram_npcx_driver_api = {
93+
static DEVICE_API(bbram, bbram_npcx_driver_api) = {
9494
.check_invalid = bbram_npcx_check_invalid,
9595
.check_standby_power = bbram_npcx_check_standby_power,
9696
.check_power = bbram_npcx_check_power,

drivers/bbram/bbram_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int bbram_stm32_get_size(const struct device *dev, size_t *size)
9494
return 0;
9595
}
9696

97-
static const struct bbram_driver_api bbram_stm32_driver_api = {
97+
static DEVICE_API(bbram, bbram_stm32_driver_api) = {
9898
.read = bbram_stm32_read,
9999
.write = bbram_stm32_write,
100100
.get_size = bbram_stm32_get_size,

drivers/bbram/bbram_xec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static int bbram_xec_write(const struct device *dev, size_t offset, size_t size,
7272
return 0;
7373
}
7474

75-
static const struct bbram_driver_api bbram_xec_driver_api = {
75+
static DEVICE_API(bbram, bbram_xec_driver_api) = {
7676
.check_invalid = bbram_xec_check_invalid,
7777
.get_size = bbram_xec_get_size,
7878
.read = bbram_xec_read,

0 commit comments

Comments
 (0)