summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/qcom/venus/hfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/qcom/venus/hfi.c')
-rw-r--r--drivers/media/platform/qcom/venus/hfi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c
index 1baf78d3c02d..bca894a00c07 100644
--- a/drivers/media/platform/qcom/venus/hfi.c
+++ b/drivers/media/platform/qcom/venus/hfi.c
@@ -106,8 +106,8 @@ int hfi_core_deinit(struct venus_core *core, bool blocking)
if (!empty) {
mutex_unlock(&core->lock);
- wait_on_atomic_t(&core->insts_count, atomic_t_wait,
- TASK_UNINTERRUPTIBLE);
+ wait_var_event(&core->insts_count,
+ !atomic_read(&core->insts_count));
mutex_lock(&core->lock);
}
@@ -229,8 +229,8 @@ void hfi_session_destroy(struct venus_inst *inst)
mutex_lock(&core->lock);
list_del_init(&inst->list);
- atomic_dec(&core->insts_count);
- wake_up_atomic_t(&core->insts_count);
+ if (atomic_dec_and_test(&core->insts_count))
+ wake_up_var(&core->insts_count);
mutex_unlock(&core->lock);
}
EXPORT_SYMBOL_GPL(hfi_session_destroy);