diff --git a/drivers/dma/dma_andes_atcdmac300.c b/drivers/dma/dma_andes_atcdmac300.c index 8f67a3cacd901cd..e2856b4d2507256 100644 --- a/drivers/dma/dma_andes_atcdmac300.c +++ b/drivers/dma/dma_andes_atcdmac300.c @@ -493,7 +493,7 @@ static int dma_atcdmac300_get_status(const struct device *dev, return 0; } -static const struct dma_driver_api dma_atcdmac300_api = { +static DEVICE_API(dma, dma_atcdmac300_api) = { .config = dma_atcdmac300_config, .reload = dma_atcdmac300_reload, .start = dma_atcdmac300_transfer_start, diff --git a/drivers/dma/dma_dw.c b/drivers/dma/dma_dw.c index 138f428049cd9ac..8545ed7dffcfa39 100644 --- a/drivers/dma/dma_dw.c +++ b/drivers/dma/dma_dw.c @@ -48,7 +48,7 @@ static int dw_dma_init(const struct device *dev) return ret; } -static const struct dma_driver_api dw_dma_driver_api = { +static DEVICE_API(dma, dw_dma_driver_api) = { .config = dw_dma_config, .start = dw_dma_start, .stop = dw_dma_stop, diff --git a/drivers/dma/dma_dw_axi.c b/drivers/dma/dma_dw_axi.c index 917f7008876ac95..a0df451ffef3ee7 100644 --- a/drivers/dma/dma_dw_axi.c +++ b/drivers/dma/dma_dw_axi.c @@ -851,7 +851,7 @@ static int dma_dw_axi_init(const struct device *dev) return 0; } -static const struct dma_driver_api dma_dw_axi_driver_api = { +static DEVICE_API(dma, dma_dw_axi_driver_api) = { .config = dma_dw_axi_config, .start = dma_dw_axi_start, .stop = dma_dw_axi_stop, diff --git a/drivers/dma/dma_emul.c b/drivers/dma/dma_emul.c index 60c3486bf36bc43..bdb5245ae4648b2 100644 --- a/drivers/dma/dma_emul.c +++ b/drivers/dma/dma_emul.c @@ -513,7 +513,7 @@ static bool dma_emul_chan_filter(const struct device *dev, int channel, void *fi return success; } -static const struct dma_driver_api dma_emul_driver_api = { +static DEVICE_API(dma, dma_emul_driver_api) = { .config = dma_emul_configure, .reload = dma_emul_reload, .start = dma_emul_start, diff --git a/drivers/dma/dma_esp32_gdma.c b/drivers/dma/dma_esp32_gdma.c index 7fb5da72b43b618..c7874a65ce8071d 100644 --- a/drivers/dma/dma_esp32_gdma.c +++ b/drivers/dma/dma_esp32_gdma.c @@ -605,7 +605,7 @@ static int dma_esp32_init(const struct device *dev) return 0; } -static const struct dma_driver_api dma_esp32_api = { +static DEVICE_API(dma, dma_esp32_api) = { .config = dma_esp32_config, .start = dma_esp32_start, .stop = dma_esp32_stop, diff --git a/drivers/dma/dma_gd32.c b/drivers/dma/dma_gd32.c index 1bea14bb32ad30c..ec6fb51d4fb3819 100644 --- a/drivers/dma/dma_gd32.c +++ b/drivers/dma/dma_gd32.c @@ -651,7 +651,7 @@ static void dma_gd32_isr(const struct device *dev) } } -static const struct dma_driver_api dma_gd32_driver_api = { +static DEVICE_API(dma, dma_gd32_driver_api) = { .config = dma_gd32_config, .reload = dma_gd32_reload, .start = dma_gd32_start, diff --git a/drivers/dma/dma_intel_adsp_gpdma.c b/drivers/dma/dma_intel_adsp_gpdma.c index bed6296adf8fd12..f6907f6efd2247f 100644 --- a/drivers/dma/dma_intel_adsp_gpdma.c +++ b/drivers/dma/dma_intel_adsp_gpdma.c @@ -487,7 +487,7 @@ static int gpdma_pm_action(const struct device *dev, enum pm_device_action actio } #endif -static const struct dma_driver_api intel_adsp_gpdma_driver_api = { +static DEVICE_API(dma, intel_adsp_gpdma_driver_api) = { .config = intel_adsp_gpdma_config, .reload = intel_adsp_gpdma_copy, .start = intel_adsp_gpdma_start, diff --git a/drivers/dma/dma_intel_adsp_hda_host_in.c b/drivers/dma/dma_intel_adsp_hda_host_in.c index a6114b054042674..96695c025078955 100644 --- a/drivers/dma/dma_intel_adsp_hda_host_in.c +++ b/drivers/dma/dma_intel_adsp_hda_host_in.c @@ -10,7 +10,7 @@ #include #include "dma_intel_adsp_hda.h" -static const struct dma_driver_api intel_adsp_hda_dma_host_in_api = { +static DEVICE_API(dma, intel_adsp_hda_dma_host_in_api) = { .config = intel_adsp_hda_dma_host_in_config, .reload = intel_adsp_hda_dma_host_reload, .start = intel_adsp_hda_dma_start, diff --git a/drivers/dma/dma_intel_adsp_hda_host_out.c b/drivers/dma/dma_intel_adsp_hda_host_out.c index f06d177ed29632c..2072e35d942e787 100644 --- a/drivers/dma/dma_intel_adsp_hda_host_out.c +++ b/drivers/dma/dma_intel_adsp_hda_host_out.c @@ -14,7 +14,7 @@ #include LOG_MODULE_REGISTER(dma_intel_adsp_hda_dma_host_out); -static const struct dma_driver_api intel_adsp_hda_dma_host_out_api = { +static DEVICE_API(dma, intel_adsp_hda_dma_host_out_api) = { .config = intel_adsp_hda_dma_host_out_config, .reload = intel_adsp_hda_dma_host_reload, .start = intel_adsp_hda_dma_start, diff --git a/drivers/dma/dma_intel_adsp_hda_link_in.c b/drivers/dma/dma_intel_adsp_hda_link_in.c index fc631d136f0c756..f6be51bfdd72627 100644 --- a/drivers/dma/dma_intel_adsp_hda_link_in.c +++ b/drivers/dma/dma_intel_adsp_hda_link_in.c @@ -13,7 +13,7 @@ #include LOG_MODULE_REGISTER(dma_intel_adsp_hda_dma_link_in); -static const struct dma_driver_api intel_adsp_hda_dma_link_in_api = { +static DEVICE_API(dma, intel_adsp_hda_dma_link_in_api) = { .config = intel_adsp_hda_dma_link_in_config, .reload = intel_adsp_hda_dma_link_reload, .start = intel_adsp_hda_dma_start, diff --git a/drivers/dma/dma_intel_adsp_hda_link_out.c b/drivers/dma/dma_intel_adsp_hda_link_out.c index eefa50189f0ec01..b3b5f1396d475c1 100644 --- a/drivers/dma/dma_intel_adsp_hda_link_out.c +++ b/drivers/dma/dma_intel_adsp_hda_link_out.c @@ -13,7 +13,7 @@ #include LOG_MODULE_REGISTER(dma_intel_adsp_hda_dma_link_out); -static const struct dma_driver_api intel_adsp_hda_dma_link_out_api = { +static DEVICE_API(dma, intel_adsp_hda_dma_link_out_api) = { .config = intel_adsp_hda_dma_link_out_config, .reload = intel_adsp_hda_dma_link_reload, .start = intel_adsp_hda_dma_start, diff --git a/drivers/dma/dma_intel_lpss.c b/drivers/dma/dma_intel_lpss.c index ad004fc1cf865be..40553928b5325ae 100644 --- a/drivers/dma/dma_intel_lpss.c +++ b/drivers/dma/dma_intel_lpss.c @@ -129,7 +129,7 @@ void dma_intel_lpss_isr(const struct device *dev) dw_dma_isr(dev); } -static const struct dma_driver_api dma_intel_lpss_driver_api = { +static DEVICE_API(dma, dma_intel_lpss_driver_api) = { .config = dw_dma_config, .start = dw_dma_start, .reload = dma_intel_lpss_reload, diff --git a/drivers/dma/dma_iproc_pax_v1.c b/drivers/dma/dma_iproc_pax_v1.c index 9acfeabd37481f5..4073238da167530 100644 --- a/drivers/dma/dma_iproc_pax_v1.c +++ b/drivers/dma/dma_iproc_pax_v1.c @@ -965,7 +965,7 @@ static int dma_iproc_pax_transfer_stop(const struct device *dev, return 0; } -static const struct dma_driver_api pax_dma_driver_api = { +static DEVICE_API(dma, pax_dma_driver_api) = { .config = dma_iproc_pax_configure, .start = dma_iproc_pax_transfer_start, .stop = dma_iproc_pax_transfer_stop, diff --git a/drivers/dma/dma_iproc_pax_v2.c b/drivers/dma/dma_iproc_pax_v2.c index 556af62ae75e938..a3d7522a87ff262 100644 --- a/drivers/dma/dma_iproc_pax_v2.c +++ b/drivers/dma/dma_iproc_pax_v2.c @@ -1081,7 +1081,7 @@ static int dma_iproc_pax_transfer_stop(const struct device *dev, return 0; } -static const struct dma_driver_api pax_dma_driver_api = { +static DEVICE_API(dma, pax_dma_driver_api) = { .config = dma_iproc_pax_configure, .start = dma_iproc_pax_transfer_start, .stop = dma_iproc_pax_transfer_stop, diff --git a/drivers/dma/dma_max32.c b/drivers/dma/dma_max32.c index 100c14629bf1826..79bbb7b95ed339a 100644 --- a/drivers/dma/dma_max32.c +++ b/drivers/dma/dma_max32.c @@ -318,7 +318,7 @@ static int max32_dma_init(const struct device *dev) return 0; } -static const struct dma_driver_api max32_dma_driver_api = { +static DEVICE_API(dma, max32_dma_driver_api) = { .config = max32_dma_config, .reload = max32_dma_reload, .start = max32_dma_start, diff --git a/drivers/dma/dma_mchp_xec.c b/drivers/dma/dma_mchp_xec.c index 699aa5deef81595..e54efd1526096d6 100644 --- a/drivers/dma/dma_mchp_xec.c +++ b/drivers/dma/dma_mchp_xec.c @@ -644,7 +644,7 @@ static bool dma_xec_chan_filter(const struct device *dev, int ch, void *filter_p } /* API - HW does not stupport suspend/resume */ -static const struct dma_driver_api dma_xec_api = { +static DEVICE_API(dma, dma_xec_api) = { .config = dma_xec_configure, .reload = dma_xec_reload, .start = dma_xec_start, diff --git a/drivers/dma/dma_mcux_edma.c b/drivers/dma/dma_mcux_edma.c index 5c9cbcf40df7aa2..2937060fd893e3e 100644 --- a/drivers/dma/dma_mcux_edma.c +++ b/drivers/dma/dma_mcux_edma.c @@ -799,7 +799,7 @@ static bool dma_mcux_edma_channel_filter(const struct device *dev, return true; } -static const struct dma_driver_api dma_mcux_edma_api = { +static DEVICE_API(dma, dma_mcux_edma_api) = { .reload = dma_mcux_edma_reload, .config = dma_mcux_edma_configure, .start = dma_mcux_edma_start, diff --git a/drivers/dma/dma_mcux_lpc.c b/drivers/dma/dma_mcux_lpc.c index 3ef75ac11767a82..fde97055284cf0b 100644 --- a/drivers/dma/dma_mcux_lpc.c +++ b/drivers/dma/dma_mcux_lpc.c @@ -854,7 +854,7 @@ static int dma_mcux_lpc_init(const struct device *dev) return 0; } -static const struct dma_driver_api dma_mcux_lpc_api = { +static DEVICE_API(dma, dma_mcux_lpc_api) = { .config = dma_mcux_lpc_configure, .start = dma_mcux_lpc_start, .stop = dma_mcux_lpc_stop, diff --git a/drivers/dma/dma_mcux_pxp.c b/drivers/dma/dma_mcux_pxp.c index 64f3154807c3237..dadfa5c03cf5687 100644 --- a/drivers/dma/dma_mcux_pxp.c +++ b/drivers/dma/dma_mcux_pxp.c @@ -183,7 +183,7 @@ static int dma_mcux_pxp_start(const struct device *dev, uint32_t channel) return 0; } -static const struct dma_driver_api dma_mcux_pxp_api = { +static DEVICE_API(dma, dma_mcux_pxp_api) = { .config = dma_mcux_pxp_configure, .start = dma_mcux_pxp_start, }; diff --git a/drivers/dma/dma_mcux_smartdma.c b/drivers/dma/dma_mcux_smartdma.c index 86663dd02e8b7bb..af7fb600be99446 100644 --- a/drivers/dma/dma_mcux_smartdma.c +++ b/drivers/dma/dma_mcux_smartdma.c @@ -129,7 +129,7 @@ void dma_smartdma_install_fw(const struct device *dev, uint8_t *firmware, SMARTDMA_InstallFirmware((uint32_t)config->smartdma_progs, firmware, len); } -static const struct dma_driver_api dma_mcux_smartdma_api = { +static DEVICE_API(dma, dma_mcux_smartdma_api) = { .config = dma_mcux_smartdma_configure, .start = dma_mcux_smartdma_start, .stop = dma_mcux_smartdma_stop, diff --git a/drivers/dma/dma_nios2_msgdma.c b/drivers/dma/dma_nios2_msgdma.c index ccc7b1e58ad1761..21b86d31c620f37 100644 --- a/drivers/dma/dma_nios2_msgdma.c +++ b/drivers/dma/dma_nios2_msgdma.c @@ -197,7 +197,7 @@ static int nios2_msgdma_transfer_stop(const struct device *dev, return status; } -static const struct dma_driver_api nios2_msgdma_driver_api = { +static DEVICE_API(dma, nios2_msgdma_driver_api) = { .config = nios2_msgdma_config, .start = nios2_msgdma_transfer_start, .stop = nios2_msgdma_transfer_stop, diff --git a/drivers/dma/dma_nxp_edma.c b/drivers/dma/dma_nxp_edma.c index 7d4f6e8b44958ab..dcfd7ace71667a5 100644 --- a/drivers/dma/dma_nxp_edma.c +++ b/drivers/dma/dma_nxp_edma.c @@ -592,7 +592,7 @@ static bool edma_channel_filter(const struct device *dev, int chan_id, void *par return false; } -static const struct dma_driver_api edma_api = { +static DEVICE_API(dma, edma_api) = { .reload = edma_reload, .config = edma_config, .start = edma_start, diff --git a/drivers/dma/dma_nxp_sof_host_dma.c b/drivers/dma/dma_nxp_sof_host_dma.c index baafd69551ecad8..065107f7003b900 100644 --- a/drivers/dma/dma_nxp_sof_host_dma.c +++ b/drivers/dma/dma_nxp_sof_host_dma.c @@ -271,7 +271,7 @@ static int sof_host_dma_get_attribute(const struct device *dev, uint32_t type, u return 0; } -static const struct dma_driver_api sof_host_dma_api = { +static DEVICE_API(dma, sof_host_dma_api) = { .reload = sof_host_dma_reload, .config = sof_host_dma_config, .start = sof_host_dma_start, diff --git a/drivers/dma/dma_pl330.c b/drivers/dma/dma_pl330.c index 5bc161c51219679..844c4c7657215d3 100644 --- a/drivers/dma/dma_pl330.c +++ b/drivers/dma/dma_pl330.c @@ -565,7 +565,7 @@ static int dma_pl330_initialize(const struct device *dev) return 0; } -static const struct dma_driver_api pl330_driver_api = { +static DEVICE_API(dma, pl330_driver_api) = { .config = dma_pl330_configure, .start = dma_pl330_transfer_start, .stop = dma_pl330_transfer_stop, diff --git a/drivers/dma/dma_rpi_pico.c b/drivers/dma/dma_rpi_pico.c index 57c23ced657f1bd..bf3124ce35bc0b1 100644 --- a/drivers/dma/dma_rpi_pico.c +++ b/drivers/dma/dma_rpi_pico.c @@ -333,7 +333,7 @@ static void dma_rpi_pico_isr(const struct device *dev) } } -static const struct dma_driver_api dma_rpi_pico_driver_api = { +static DEVICE_API(dma, dma_rpi_pico_driver_api) = { .config = dma_rpi_pico_config, .reload = dma_rpi_pico_reload, .start = dma_rpi_pico_start, diff --git a/drivers/dma/dma_sam0.c b/drivers/dma/dma_sam0.c index fde5a250e84ec67..25b5dc2294f1822 100644 --- a/drivers/dma/dma_sam0.c +++ b/drivers/dma/dma_sam0.c @@ -446,7 +446,7 @@ static int dma_sam0_init(const struct device *dev) static struct dma_sam0_data dmac_data; -static const struct dma_driver_api dma_sam0_api = { +static DEVICE_API(dma, dma_sam0_api) = { .config = dma_sam0_config, .start = dma_sam0_start, .stop = dma_sam0_stop, diff --git a/drivers/dma/dma_sam_xdmac.c b/drivers/dma/dma_sam_xdmac.c index 569085e5766cd36..2deeeba8173911b 100644 --- a/drivers/dma/dma_sam_xdmac.c +++ b/drivers/dma/dma_sam_xdmac.c @@ -399,7 +399,7 @@ static int sam_xdmac_get_status(const struct device *dev, uint32_t channel, return 0; } -static const struct dma_driver_api sam_xdmac_driver_api = { +static DEVICE_API(dma, sam_xdmac_driver_api) = { .config = sam_xdmac_config, .reload = sam_xdmac_transfer_reload, .start = sam_xdmac_transfer_start, diff --git a/drivers/dma/dma_sedi.c b/drivers/dma/dma_sedi.c index 03f43e87580ae27..ca1357983938855 100644 --- a/drivers/dma/dma_sedi.c +++ b/drivers/dma/dma_sedi.c @@ -350,7 +350,7 @@ static int dma_sedi_stop(const struct device *dev, uint32_t channel) return 0; } -static const struct dma_driver_api dma_funcs = { .config = dma_sedi_chan_config, +static DEVICE_API(dma, dma_funcs) = { .config = dma_sedi_chan_config, .start = dma_sedi_start, .stop = dma_sedi_stop, .reload = dma_sedi_reload, diff --git a/drivers/dma/dma_si32.c b/drivers/dma/dma_si32.c index f6b8a46f1177c82..4463a19fc056db3 100644 --- a/drivers/dma/dma_si32.c +++ b/drivers/dma/dma_si32.c @@ -417,7 +417,7 @@ static int dma_si32_stop(const struct device *dev, const uint32_t channel) return 0; } -static const struct dma_driver_api dma_si32_driver_api = { +static DEVICE_API(dma, dma_si32_driver_api) = { .config = dma_si32_config, .start = dma_si32_start, .stop = dma_si32_stop, diff --git a/drivers/dma/dma_stm32.c b/drivers/dma/dma_stm32.c index 8afc07792b55f34..a50ba310a86d7a1 100644 --- a/drivers/dma/dma_stm32.c +++ b/drivers/dma/dma_stm32.c @@ -686,7 +686,7 @@ DMA_STM32_EXPORT_API int dma_stm32_get_status(const struct device *dev, return 0; } -static const struct dma_driver_api dma_funcs = { +static DEVICE_API(dma, dma_funcs) = { .reload = dma_stm32_reload, .config = dma_stm32_configure, .start = dma_stm32_start, diff --git a/drivers/dma/dma_stm32_bdma.c b/drivers/dma/dma_stm32_bdma.c index 1e814e8481543a6..7825a5520210fa2 100644 --- a/drivers/dma/dma_stm32_bdma.c +++ b/drivers/dma/dma_stm32_bdma.c @@ -849,7 +849,7 @@ BDMA_STM32_EXPORT_API int bdma_stm32_get_status(const struct device *dev, return 0; } -static const struct dma_driver_api dma_funcs = { +static DEVICE_API(dma, dma_funcs) = { .reload = bdma_stm32_reload, .config = bdma_stm32_configure, .start = bdma_stm32_start, diff --git a/drivers/dma/dma_stm32u5.c b/drivers/dma/dma_stm32u5.c index ca57ee8f36a90fa..57c3f63ecdc81ea 100644 --- a/drivers/dma/dma_stm32u5.c +++ b/drivers/dma/dma_stm32u5.c @@ -707,7 +707,7 @@ static int dma_stm32_get_status(const struct device *dev, return 0; } -static const struct dma_driver_api dma_funcs = { +static DEVICE_API(dma, dma_funcs) = { .reload = dma_stm32_reload, .config = dma_stm32_configure, .start = dma_stm32_start, diff --git a/drivers/dma/dma_xilinx_axi_dma.c b/drivers/dma/dma_xilinx_axi_dma.c index 7138fbe21276498..3b40f42f56000cc 100644 --- a/drivers/dma/dma_xilinx_axi_dma.c +++ b/drivers/dma/dma_xilinx_axi_dma.c @@ -1061,7 +1061,7 @@ static bool dma_xilinx_axi_dma_chan_filter(const struct device *dev, int channel } /* DMA API callbacks */ -static const struct dma_driver_api dma_xilinx_axi_dma_driver_api = { +static DEVICE_API(dma, dma_xilinx_axi_dma_driver_api) = { .config = dma_xilinx_axi_dma_configure, .reload = dma_xilinx_axi_dma_config_reload, .start = dma_xilinx_axi_dma_start, diff --git a/drivers/dma/dma_xmc4xxx.c b/drivers/dma/dma_xmc4xxx.c index ffe7b964aba8535..f5483280f6bc58e 100644 --- a/drivers/dma/dma_xmc4xxx.c +++ b/drivers/dma/dma_xmc4xxx.c @@ -457,7 +457,7 @@ static int dma_xmc4xxx_init(const struct device *dev) return 0; } -static const struct dma_driver_api dma_xmc4xxx_driver_api = { +static DEVICE_API(dma, dma_xmc4xxx_driver_api) = { .config = dma_xmc4xxx_config, .reload = dma_xmc4xxx_reload, .start = dma_xmc4xxx_start, diff --git a/drivers/dma/dmamux_stm32.c b/drivers/dma/dmamux_stm32.c index 71a470f5328516a..f7a16caca763854 100644 --- a/drivers/dma/dmamux_stm32.c +++ b/drivers/dma/dmamux_stm32.c @@ -290,7 +290,7 @@ static int dmamux_stm32_init(const struct device *dev) return 0; } -static const struct dma_driver_api dma_funcs = { +static DEVICE_API(dma, dma_funcs) = { .reload = dmamux_stm32_reload, .config = dmamux_stm32_configure, .start = dmamux_stm32_start,