Skip to content

Commit 0c75641

Browse files
pdgendtkartben
authored andcommitted
drivers: fpga: Place API into iterable section
Add wrapper DEVICE_API macro to all fpga_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent b51c8cb commit 0c75641

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

drivers/fpga/fpga_altera_agilex_bridge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ static int altera_fpga_init(const struct device *dev)
465465
return 0;
466466
}
467467

468-
static const struct fpga_driver_api altera_fpga_api = {
468+
static DEVICE_API(fpga, altera_fpga_api) = {
469469
.on = altera_fpga_on,
470470
.off = altera_fpga_off,
471471
};

drivers/fpga/fpga_eos_s3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static int eos_s3_fpga_init(const struct device *dev)
140140

141141
static struct quickfeather_fpga_data fpga_data;
142142

143-
static const struct fpga_driver_api eos_s3_api = {
143+
static DEVICE_API(fpga, eos_s3_api) = {
144144
.reset = eos_s3_fpga_reset,
145145
.load = eos_s3_fpga_load,
146146
.get_status = eos_s3_fpga_get_status,

drivers/fpga/fpga_ice40_bitbang.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int fpga_ice40_load(const struct device *dev, uint32_t *image_ptr, uint32
237237
return ret;
238238
}
239239

240-
static const struct fpga_driver_api fpga_ice40_api = {
240+
static DEVICE_API(fpga, fpga_ice40_api) = {
241241
.get_status = fpga_ice40_get_status,
242242
.reset = fpga_ice40_reset,
243243
.load = fpga_ice40_load,

drivers/fpga/fpga_ice40_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static int fpga_ice40_load(const struct device *dev, uint32_t *image_ptr, uint32
166166
return ret;
167167
}
168168

169-
static const struct fpga_driver_api fpga_ice40_api = {
169+
static DEVICE_API(fpga, fpga_ice40_api) = {
170170
.get_status = fpga_ice40_get_status,
171171
.reset = fpga_ice40_reset,
172172
.load = fpga_ice40_load,

drivers/fpga/fpga_mpfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static struct mpfs_fpga_config fpga_config = {
402402
.mailbox = DT_INST_REG_ADDR_BY_IDX(0, 2),
403403
};
404404

405-
static const struct fpga_driver_api mpfs_fpga_api = {
405+
static DEVICE_API(fpga, mpfs_fpga_api) = {
406406
.reset = mpfs_fpga_reset,
407407
.load = mpfs_fpga_load,
408408
.get_info = mpfs_fpga_get_info,

drivers/fpga/fpga_slg471x5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int fpga_slg471x5_reset(const struct device *dev)
148148
return 0;
149149
}
150150

151-
static const struct fpga_driver_api fpga_slg471x5_api = {
151+
static DEVICE_API(fpga, fpga_slg471x5_api) = {
152152
.get_status = fpga_slg471x5_get_status,
153153
.reset = fpga_slg471x5_reset,
154154
.load = fpga_slg471x5_load,

drivers/fpga/fpga_zynqmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static int zynqmp_fpga_init(const struct device *dev)
315315

316316
static struct zynqmp_fpga_data fpga_data;
317317

318-
static const struct fpga_driver_api zynqmp_api = {
318+
static DEVICE_API(fpga, zynqmp_api) = {
319319
.reset = zynqmp_fpga_reset,
320320
.load = zynqmp_fpga_load,
321321
.get_status = zynqmp_fpga_get_status,

0 commit comments

Comments
 (0)