diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2021-09-02 11:56:17 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-05 08:44:48 -0400 |
commit | 4f53ac2adbc0f4d3bfebee1b414870e228469989 (patch) | |
tree | e5c87fdaad364c2a78df4875fce1da3809f91b2d /include/tee.h | |
parent | 51827f9a8be3def01b837a2809094e2fd2703b6a (diff) |
tee: add a stub for tee_find_device
Add stub for tee_find_device function when CONFIG_TEE is not activated
to simplify the caller code.
This patch allows to remove the CONFIG_IS_ENABLED(OPTEE) tests
for stm32 platform.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Acked-by: Etienne Carriere <etienne.carriere@inaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'include/tee.h')
-rw-r--r-- | include/tee.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/tee.h b/include/tee.h index 2ef29bfc8f..44e9cd4321 100644 --- a/include/tee.h +++ b/include/tee.h @@ -307,11 +307,22 @@ bool tee_shm_is_registered(struct tee_shm *shm, struct udevice *dev); * Returns a probed TEE device of the first TEE device matched by the * match() callback or NULL. */ +#if CONFIG_IS_ENABLED(TEE) struct udevice *tee_find_device(struct udevice *start, int (*match)(struct tee_version_data *vers, const void *data), const void *data, struct tee_version_data *vers); +#else +static inline struct udevice *tee_find_device(struct udevice *start, + int (*match)(struct tee_version_data *vers, + const void *data), + const void *data, + struct tee_version_data *vers) +{ + return NULL; +} +#endif /** * tee_get_version() - Query capabilities of TEE device |