From 4a8f31cec65570dd2f4c409a6bb3e1ff2891bb36 Mon Sep 17 00:00:00 2001 From: Hisping Lin Date: Tue, 12 Aug 2025 09:33:04 +0000 Subject: [PATCH] nvmem: rockchip-secure-otp: Resolve compilation errors Signed-off-by: Hisping Lin Change-Id: I4ed285797a667b9721a09885556f7d0fb31869c1 --- drivers/nvmem/rockchip-secure-otp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/nvmem/rockchip-secure-otp.c b/drivers/nvmem/rockchip-secure-otp.c index e8df65c3736b..0cd8d0205347 100644 --- a/drivers/nvmem/rockchip-secure-otp.c +++ b/drivers/nvmem/rockchip-secure-otp.c @@ -98,10 +98,9 @@ int rockchip_read_oem_non_protected_otp(unsigned int byte_off, /* Alloc share memory */ shm_size = byte_len; - device_shm = tee_shm_alloc(ctx, shm_size, - TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); + device_shm = tee_shm_alloc_kernel_buf(ctx, shm_size); if (IS_ERR(device_shm)) { - pr_err("tee_shm_alloc failed\n"); + pr_err("tee_shm_alloc_kernel_buf failed\n"); rc = PTR_ERR(device_shm); goto out_sess; } @@ -201,10 +200,9 @@ int rockchip_write_oem_non_protected_otp(unsigned int byte_off, /* Alloc share memory */ shm_size = byte_len; - device_shm = tee_shm_alloc(ctx, shm_size, - TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); + device_shm = tee_shm_alloc_kernel_buf(ctx, shm_size); if (IS_ERR(device_shm)) { - pr_err("tee_shm_alloc failed\n"); + pr_err("tee_shm_alloc_kernel_buf failed\n"); rc = PTR_ERR(device_shm); goto out_sess; }