From 0c75641c982ea06c9c2ee64dc06519fcbd0db5e8 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Wed, 27 Nov 2024 22:27:37 +0100 Subject: [PATCH] drivers: fpga: Place API into iterable section Add wrapper DEVICE_API macro to all fpga_driver_api instances. Signed-off-by: Pieter De Gendt --- drivers/fpga/fpga_altera_agilex_bridge.c | 2 +- drivers/fpga/fpga_eos_s3.c | 2 +- drivers/fpga/fpga_ice40_bitbang.c | 2 +- drivers/fpga/fpga_ice40_spi.c | 2 +- drivers/fpga/fpga_mpfs.c | 2 +- drivers/fpga/fpga_slg471x5.c | 2 +- drivers/fpga/fpga_zynqmp.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/fpga/fpga_altera_agilex_bridge.c b/drivers/fpga/fpga_altera_agilex_bridge.c index 2a1f7d5a389..10b239a48f1 100644 --- a/drivers/fpga/fpga_altera_agilex_bridge.c +++ b/drivers/fpga/fpga_altera_agilex_bridge.c @@ -465,7 +465,7 @@ static int altera_fpga_init(const struct device *dev) return 0; } -static const struct fpga_driver_api altera_fpga_api = { +static DEVICE_API(fpga, altera_fpga_api) = { .on = altera_fpga_on, .off = altera_fpga_off, }; diff --git a/drivers/fpga/fpga_eos_s3.c b/drivers/fpga/fpga_eos_s3.c index 452735a4309..034d4dfc5ee 100644 --- a/drivers/fpga/fpga_eos_s3.c +++ b/drivers/fpga/fpga_eos_s3.c @@ -140,7 +140,7 @@ static int eos_s3_fpga_init(const struct device *dev) static struct quickfeather_fpga_data fpga_data; -static const struct fpga_driver_api eos_s3_api = { +static DEVICE_API(fpga, eos_s3_api) = { .reset = eos_s3_fpga_reset, .load = eos_s3_fpga_load, .get_status = eos_s3_fpga_get_status, diff --git a/drivers/fpga/fpga_ice40_bitbang.c b/drivers/fpga/fpga_ice40_bitbang.c index 941efffc8ae..789f47009fa 100644 --- a/drivers/fpga/fpga_ice40_bitbang.c +++ b/drivers/fpga/fpga_ice40_bitbang.c @@ -237,7 +237,7 @@ unlock: return ret; } -static const struct fpga_driver_api fpga_ice40_api = { +static DEVICE_API(fpga, fpga_ice40_api) = { .get_status = fpga_ice40_get_status, .reset = fpga_ice40_reset, .load = fpga_ice40_load, diff --git a/drivers/fpga/fpga_ice40_spi.c b/drivers/fpga/fpga_ice40_spi.c index 10d2a8b7129..7c2f299e782 100644 --- a/drivers/fpga/fpga_ice40_spi.c +++ b/drivers/fpga/fpga_ice40_spi.c @@ -166,7 +166,7 @@ unlock: return ret; } -static const struct fpga_driver_api fpga_ice40_api = { +static DEVICE_API(fpga, fpga_ice40_api) = { .get_status = fpga_ice40_get_status, .reset = fpga_ice40_reset, .load = fpga_ice40_load, diff --git a/drivers/fpga/fpga_mpfs.c b/drivers/fpga/fpga_mpfs.c index 6be8476a5fb..ed679cbc7f3 100644 --- a/drivers/fpga/fpga_mpfs.c +++ b/drivers/fpga/fpga_mpfs.c @@ -402,7 +402,7 @@ static struct mpfs_fpga_config fpga_config = { .mailbox = DT_INST_REG_ADDR_BY_IDX(0, 2), }; -static const struct fpga_driver_api mpfs_fpga_api = { +static DEVICE_API(fpga, mpfs_fpga_api) = { .reset = mpfs_fpga_reset, .load = mpfs_fpga_load, .get_info = mpfs_fpga_get_info, diff --git a/drivers/fpga/fpga_slg471x5.c b/drivers/fpga/fpga_slg471x5.c index 7fb3032b785..28d894083aa 100644 --- a/drivers/fpga/fpga_slg471x5.c +++ b/drivers/fpga/fpga_slg471x5.c @@ -148,7 +148,7 @@ static int fpga_slg471x5_reset(const struct device *dev) return 0; } -static const struct fpga_driver_api fpga_slg471x5_api = { +static DEVICE_API(fpga, fpga_slg471x5_api) = { .get_status = fpga_slg471x5_get_status, .reset = fpga_slg471x5_reset, .load = fpga_slg471x5_load, diff --git a/drivers/fpga/fpga_zynqmp.c b/drivers/fpga/fpga_zynqmp.c index 7cedba97bab..c06922ba7f6 100644 --- a/drivers/fpga/fpga_zynqmp.c +++ b/drivers/fpga/fpga_zynqmp.c @@ -315,7 +315,7 @@ static int zynqmp_fpga_init(const struct device *dev) static struct zynqmp_fpga_data fpga_data; -static const struct fpga_driver_api zynqmp_api = { +static DEVICE_API(fpga, zynqmp_api) = { .reset = zynqmp_fpga_reset, .load = zynqmp_fpga_load, .get_status = zynqmp_fpga_get_status,