From 10dafbfcf480afbd88149fabc12c8bd342076d79 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Wed, 1 May 2024 11:34:17 +0200 Subject: [PATCH] drivers: bbram: Rename emul_bbram_backend_api to emul_bbram_driver_api Structs with a __subsystem tag are required to have a _driver_api suffix. Signed-off-by: Pieter De Gendt --- drivers/bbram/bbram_it8xxx2_emul.c | 2 +- drivers/bbram/bbram_microchip_mcp7940n_emul.c | 2 +- drivers/bbram/bbram_npcx_emul.c | 2 +- include/zephyr/drivers/emul_bbram.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/bbram/bbram_it8xxx2_emul.c b/drivers/bbram/bbram_it8xxx2_emul.c index 901a09835f1..fea04112c0d 100644 --- a/drivers/bbram/bbram_it8xxx2_emul.c +++ b/drivers/bbram/bbram_it8xxx2_emul.c @@ -45,7 +45,7 @@ static int it8xxx2_emul_backend_get_data(const struct emul *target, size_t offse return 0; } -static const struct emul_bbram_backend_api it8xxx2_emul_backend_api = { +static const struct emul_bbram_driver_api it8xxx2_emul_backend_api = { .set_data = it8xxx2_emul_backend_set_data, .get_data = it8xxx2_emul_backend_get_data, }; diff --git a/drivers/bbram/bbram_microchip_mcp7940n_emul.c b/drivers/bbram/bbram_microchip_mcp7940n_emul.c index 56a84825948..d1206c42a16 100644 --- a/drivers/bbram/bbram_microchip_mcp7940n_emul.c +++ b/drivers/bbram/bbram_microchip_mcp7940n_emul.c @@ -135,7 +135,7 @@ static int mcp7940n_emul_backend_get_data(const struct emul *target, size_t offs return 0; } -static const struct emul_bbram_backend_api mcp7940n_emul_backend_api = { +static const struct emul_bbram_driver_api mcp7940n_emul_backend_api = { .set_data = mcp7940n_emul_backend_set_data, .get_data = mcp7940n_emul_backend_get_data, }; diff --git a/drivers/bbram/bbram_npcx_emul.c b/drivers/bbram/bbram_npcx_emul.c index 799e158eefd..354c7e8bb8f 100644 --- a/drivers/bbram/bbram_npcx_emul.c +++ b/drivers/bbram/bbram_npcx_emul.c @@ -45,7 +45,7 @@ static int npcx_emul_backend_get_data(const struct emul *target, size_t offset, return 0; } -static const struct emul_bbram_backend_api npcx_emul_backend_api = { +static const struct emul_bbram_driver_api npcx_emul_backend_api = { .set_data = npcx_emul_backend_set_data, .get_data = npcx_emul_backend_get_data, }; diff --git a/include/zephyr/drivers/emul_bbram.h b/include/zephyr/drivers/emul_bbram.h index 441f101c934..ee9edab8846 100644 --- a/include/zephyr/drivers/emul_bbram.h +++ b/include/zephyr/drivers/emul_bbram.h @@ -23,7 +23,7 @@ * These are for internal use only, so skip these in public documentation. */ -__subsystem struct emul_bbram_backend_api { +__subsystem struct emul_bbram_driver_api { /** Sets the data */ int (*set_data)(const struct emul *target, size_t offset, size_t count, const uint8_t *data); @@ -53,7 +53,7 @@ static inline int emul_bbram_backend_set_data(const struct emul *target, size_t return -ENOTSUP; } - struct emul_bbram_backend_api *api = (struct emul_bbram_backend_api *)target->backend_api; + struct emul_bbram_driver_api *api = (struct emul_bbram_driver_api *)target->backend_api; if (api->set_data == NULL) { return -ENOTSUP; @@ -80,7 +80,7 @@ static inline int emul_bbram_backend_get_data(const struct emul *target, size_t return -ENOTSUP; } - struct emul_bbram_backend_api *api = (struct emul_bbram_backend_api *)target->backend_api; + struct emul_bbram_driver_api *api = (struct emul_bbram_driver_api *)target->backend_api; if (api->get_data == NULL) { return -ENOTSUP;