From f0f5039c3dcc6f80756128aa38f2a4f5b895bbf1 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 16 Jul 2011 03:12:18 +0900 Subject: [PATCH] ASoC: Handle failed WM8994 FLL lock waits Try the completion before we start the FLL so that if an interrupt was delayed long enough for us to miss it we don't wait for the completion it signalled. Signed-off-by: Mark Brown --- sound/soc/codecs/wm8994.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index ee64be2d9942..c749ef339665 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -1713,6 +1713,9 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src, (fll.clk_ref_div << WM8994_FLL1_REFCLK_DIV_SHIFT) | (src - 1)); + /* Clear any pending completion from a previous failure */ + try_wait_for_completion(&wm8994->fll_locked[id]); + /* Enable (with fractional mode if required) */ if (freq_out) { if (fll.k) -- 2.20.1