diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2019-11-07 11:42:49 +0100 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2020-02-28 13:37:42 +0100 |
commit | 59a135f6fb669f4f79f43160c7b8c8d6bfb37f75 (patch) | |
tree | 4b84e883e9ae7fa5320e4e82bda48f99eeb04d9f /drivers | |
parent | 11a48a5a18c63fd7621bb050228cebf13566e4d8 (diff) | |
download | linux-59a135f6fb669f4f79f43160c7b8c8d6bfb37f75.tar.bz2 |
tee: remove linked list of struct tee_shm
Removes list_shm from struct tee_context since the linked list isn't used
any longer.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tee/tee_core.c | 1 | ||||
-rw-r--r-- | drivers/tee/tee_shm.c | 12 |
2 files changed, 1 insertions, 12 deletions
diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 37d22e39fd8d..6aec502c495c 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -44,7 +44,6 @@ static struct tee_context *teedev_open(struct tee_device *teedev) kref_init(&ctx->refcount); ctx->teedev = teedev; - INIT_LIST_HEAD(&ctx->list_shm); rc = teedev->desc->ops->open(ctx); if (rc) goto err; diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c index 937ac5aaa6d8..99f1c890ca3d 100644 --- a/drivers/tee/tee_shm.c +++ b/drivers/tee/tee_shm.c @@ -17,8 +17,6 @@ static void tee_shm_release(struct tee_shm *shm) mutex_lock(&teedev->mutex); idr_remove(&teedev->idr, shm->id); - if (shm->ctx) - list_del(&shm->link); mutex_unlock(&teedev->mutex); if (shm->flags & TEE_SHM_POOL) { @@ -168,12 +166,8 @@ static struct tee_shm *__tee_shm_alloc(struct tee_context *ctx, } } - if (ctx) { + if (ctx) teedev_ctx_get(ctx); - mutex_lock(&teedev->mutex); - list_add_tail(&shm->link, &ctx->list_shm); - mutex_unlock(&teedev->mutex); - } return shm; err_rem: @@ -301,10 +295,6 @@ struct tee_shm *tee_shm_register(struct tee_context *ctx, unsigned long addr, } } - mutex_lock(&teedev->mutex); - list_add_tail(&shm->link, &ctx->list_shm); - mutex_unlock(&teedev->mutex); - return shm; err: if (shm) { |