ASoC: wm8962: Unconditionally wait for the FLL to lock

If the FLL is being shut down we will exit early so there is no need to
check here and in fact we're checking the wrong thing anyway.

Reported-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Mark Brown 2012-12-12 11:28:01 +09:00
parent a2ce64750e
commit 346f1d4083

View file

@ -2873,22 +2873,20 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
ret = 0; ret = 0;
if (fll1 & WM8962_FLL_ENA) { /* This should be a massive overestimate but go even
/* This should be a massive overestimate but go even * higher if we'll error out
* higher if we'll error out */
*/ if (wm8962->irq)
if (wm8962->irq) timeout = msecs_to_jiffies(5);
timeout = msecs_to_jiffies(5); else
else timeout = msecs_to_jiffies(1);
timeout = msecs_to_jiffies(1);
timeout = wait_for_completion_timeout(&wm8962->fll_lock, timeout = wait_for_completion_timeout(&wm8962->fll_lock,
timeout); timeout);
if (timeout == 0 && wm8962->irq) { if (timeout == 0 && wm8962->irq) {
dev_err(codec->dev, "FLL lock timed out"); dev_err(codec->dev, "FLL lock timed out");
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
}
} }
wm8962->fll_fref = Fref; wm8962->fll_fref = Fref;