提交 e7ddab08 编写于 作者: J Jens Wiklander

hwrng: optee-rng: use tee_shm_alloc_kernel_buf()

Uses the new simplified tee_shm_alloc_kernel_buf() function instead of
the old deprecated tee_shm_alloc() function which required specific
TEE_SHM-flags.
Reviewed-by: NSumit Garg <sumit.garg@linaro.org>
Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
上级 aceeafef
...@@ -145,10 +145,10 @@ static int optee_rng_init(struct hwrng *rng) ...@@ -145,10 +145,10 @@ static int optee_rng_init(struct hwrng *rng)
struct optee_rng_private *pvt_data = to_optee_rng_private(rng); struct optee_rng_private *pvt_data = to_optee_rng_private(rng);
struct tee_shm *entropy_shm_pool = NULL; struct tee_shm *entropy_shm_pool = NULL;
entropy_shm_pool = tee_shm_alloc(pvt_data->ctx, MAX_ENTROPY_REQ_SZ, entropy_shm_pool = tee_shm_alloc_kernel_buf(pvt_data->ctx,
TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); MAX_ENTROPY_REQ_SZ);
if (IS_ERR(entropy_shm_pool)) { if (IS_ERR(entropy_shm_pool)) {
dev_err(pvt_data->dev, "tee_shm_alloc failed\n"); dev_err(pvt_data->dev, "tee_shm_alloc_kernel_buf failed\n");
return PTR_ERR(entropy_shm_pool); return PTR_ERR(entropy_shm_pool);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册