nvmem: rockchip-secure-otp: Resolve compilation errors

Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: I4ed285797a667b9721a09885556f7d0fb31869c1
This commit is contained in:
Hisping Lin
2025-08-12 09:33:04 +00:00
committed by hisping.lin
parent 89603c13c5
commit 4a8f31cec6

View File

@@ -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;
}