drivers: edac: Place API into iterable section

Add wrapper DEVICE_API macro to all edac_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-11-27 21:58:04 +01:00 committed by Benjamin Cabé
commit 856f4f8b59
2 changed files with 2 additions and 2 deletions

View file

@ -257,7 +257,7 @@ static int notify_callback_set(const struct device *dev,
return 0; return 0;
} }
static const struct edac_driver_api api = { static DEVICE_API(edac, api) = {
#if defined(CONFIG_EDAC_ERROR_INJECT) #if defined(CONFIG_EDAC_ERROR_INJECT)
/* Error Injection functions */ /* Error Injection functions */
.inject_set_param1 = inject_set_param1, .inject_set_param1 = inject_set_param1,

View file

@ -14,7 +14,7 @@
* EDAC dummy is used for coverage tests for -ENOSYS returns * 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, DEVICE_DEFINE(dummy_edac, "dummy_edac", NULL, NULL,
NULL, NULL, NULL, NULL,