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 <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-05-01 11:34:17 +02:00 committed by Fabio Baltieri
parent e5a126ae0e
commit 10dafbfcf4
4 changed files with 6 additions and 6 deletions

View file

@ -45,7 +45,7 @@ static int it8xxx2_emul_backend_get_data(const struct emul *target, size_t offse
return 0; 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, .set_data = it8xxx2_emul_backend_set_data,
.get_data = it8xxx2_emul_backend_get_data, .get_data = it8xxx2_emul_backend_get_data,
}; };

View file

@ -135,7 +135,7 @@ static int mcp7940n_emul_backend_get_data(const struct emul *target, size_t offs
return 0; 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, .set_data = mcp7940n_emul_backend_set_data,
.get_data = mcp7940n_emul_backend_get_data, .get_data = mcp7940n_emul_backend_get_data,
}; };

View file

@ -45,7 +45,7 @@ static int npcx_emul_backend_get_data(const struct emul *target, size_t offset,
return 0; 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, .set_data = npcx_emul_backend_set_data,
.get_data = npcx_emul_backend_get_data, .get_data = npcx_emul_backend_get_data,
}; };

View file

@ -23,7 +23,7 @@
* These are for internal use only, so skip these in public documentation. * 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 */ /** Sets the data */
int (*set_data)(const struct emul *target, size_t offset, size_t count, int (*set_data)(const struct emul *target, size_t offset, size_t count,
const uint8_t *data); const uint8_t *data);
@ -53,7 +53,7 @@ static inline int emul_bbram_backend_set_data(const struct emul *target, size_t
return -ENOTSUP; 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) { if (api->set_data == NULL) {
return -ENOTSUP; return -ENOTSUP;
@ -80,7 +80,7 @@ static inline int emul_bbram_backend_get_data(const struct emul *target, size_t
return -ENOTSUP; 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) { if (api->get_data == NULL) {
return -ENOTSUP; return -ENOTSUP;