diff options
author | Chris Fries <C.Fries@motorola.com> | 2010-10-24 22:48:17 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2010-11-02 19:43:33 -0700 |
commit | 47e55a567c42ccc20b289875e51fbc64afa578b6 (patch) | |
tree | d1caaa52155718bedcf8ea33a7c7911e593f20f5 /arch | |
parent | 8e1fb0fecee6f1b7ce923486532f9c40f3c946cc (diff) |
[ARM] tegra_spdif_audio: add timeout to prevent flush deadlock
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/tegra_i2s_audio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/tegra_i2s_audio.c b/arch/arm/mach-tegra/tegra_i2s_audio.c index bca3828f3c6a..a1bcc90b7519 100644 --- a/arch/arm/mach-tegra/tegra_i2s_audio.c +++ b/arch/arm/mach-tegra/tegra_i2s_audio.c @@ -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; |