[ARM] tegra_spdif_audio: add timeout to prevent flush deadlock

Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
Chris Fries
2010-10-24 22:48:17 -05:00
committed by Iliyan Malchev
parent 8e1fb0fece
commit 47e55a567c

View File

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