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