From 856f4f8b590ba01f286ca6db41f3fea1b64706dc Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Wed, 27 Nov 2024 21:58:04 +0100 Subject: [PATCH] drivers: edac: Place API into iterable section Add wrapper DEVICE_API macro to all edac_driver_api instances. Signed-off-by: Pieter De Gendt --- drivers/edac/edac_ibecc.c | 2 +- tests/subsys/edac/ibecc/src/dummy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/edac_ibecc.c b/drivers/edac/edac_ibecc.c index f8ea556f434..6a78f40a87a 100644 --- a/drivers/edac/edac_ibecc.c +++ b/drivers/edac/edac_ibecc.c @@ -257,7 +257,7 @@ static int notify_callback_set(const struct device *dev, return 0; } -static const struct edac_driver_api api = { +static DEVICE_API(edac, api) = { #if defined(CONFIG_EDAC_ERROR_INJECT) /* Error Injection functions */ .inject_set_param1 = inject_set_param1, diff --git a/tests/subsys/edac/ibecc/src/dummy.c b/tests/subsys/edac/ibecc/src/dummy.c index f9ea4beca23..ca3c3cf40b6 100644 --- a/tests/subsys/edac/ibecc/src/dummy.c +++ b/tests/subsys/edac/ibecc/src/dummy.c @@ -14,7 +14,7 @@ * EDAC dummy is used for coverage tests for -ENOSYS returns */ -static const struct edac_driver_api edac_dummy_api = { 0 }; +static DEVICE_API(edac, edac_dummy_api) = { 0 }; DEVICE_DEFINE(dummy_edac, "dummy_edac", NULL, NULL, NULL, NULL,