diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2022-02-04 12:33:55 +0300 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2022-02-16 09:49:41 +0300 |
commit | 924e32269228a4e2575e50e6fd6ed83cb57aa52a (patch) | |
tree | d34f9fa198c09c11dad0c74fb4b9e3e264e94dc9 /drivers/tee/optee/ffa_abi.c | |
parent | 5d41f1b3e3282909b6bbceacb9aebe1d3c849a49 (diff) | |
download | linux-924e32269228a4e2575e50e6fd6ed83cb57aa52a.tar.xz |
optee: add optee_pool_op_free_helper()
Adds a common helper function to free a tee_shm allocated using the
helper function optee_pool_op_alloc_helper().
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee/optee/ffa_abi.c')
-rw-r--r-- | drivers/tee/optee/ffa_abi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index fb7345941024..8cd9c70a9268 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -379,9 +379,7 @@ static int pool_ffa_op_alloc(struct tee_shm_pool *pool, static void pool_ffa_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) { - optee_ffa_shm_unregister(shm->ctx, shm); - free_pages((unsigned long)shm->kaddr, get_order(shm->size)); - shm->kaddr = NULL; + optee_pool_op_free_helper(pool, shm, optee_ffa_shm_unregister); } static void pool_ffa_op_destroy_pool(struct tee_shm_pool *pool) |