mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
[ARM] tegra_spdif_audio: add timeout to prevent flush deadlock
Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
committed by
Iliyan Malchev
parent
8e1fb0fece
commit
47e55a567c
@@ -668,8 +668,10 @@ static bool wait_till_stopped(struct audio_stream *as)
|
||||
{
|
||||
int rc;
|
||||
pr_debug("%s: wait for completion\n", __func__);
|
||||
rc = wait_for_completion_interruptible(
|
||||
&as->stop_completion);
|
||||
rc = wait_for_completion_interruptible_timeout(
|
||||
&as->stop_completion, HZ);
|
||||
if (!rc)
|
||||
pr_err("%s: wait timed out", __func__);
|
||||
allow_suspend(as);
|
||||
pr_debug("%s: done: %d\n", __func__, rc);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user