aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-11 21:28:01 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-24 10:38:10 -0500
commit346f1d40833c75ddb5e9e4b47fb00e20f8152762 (patch)
tree7830b825d843288974b040f08c6af5dd9e75d9c1 /sound
parenta2ce64750e07d74c51f02c5652edfc1aa2d8e894 (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8962.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 0b3680315df8..e9710280e5e1 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2873,22 +2873,20 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
2873 2873
2874 ret = 0; 2874 ret = 0;
2875 2875
2876 if (fll1 & WM8962_FLL_ENA) { 2876 /* This should be a massive overestimate but go even
2877 /* This should be a massive overestimate but go even 2877 * higher if we'll error out
2878 * higher if we'll error out 2878 */
2879 */ 2879 if (wm8962->irq)
2880 if (wm8962->irq) 2880 timeout = msecs_to_jiffies(5);
2881 timeout = msecs_to_jiffies(5); 2881 else
2882 else 2882 timeout = msecs_to_jiffies(1);
2883 timeout = msecs_to_jiffies(1);
2884 2883
2885 timeout = wait_for_completion_timeout(&wm8962->fll_lock, 2884 timeout = wait_for_completion_timeout(&wm8962->fll_lock,
2886 timeout); 2885 timeout);
2887 2886
2888 if (timeout == 0 && wm8962->irq) { 2887 if (timeout == 0 && wm8962->irq) {
2889 dev_err(codec->dev, "FLL lock timed out"); 2888 dev_err(codec->dev, "FLL lock timed out");
2890 ret = -ETIMEDOUT; 2889 ret = -ETIMEDOUT;
2891 }
2892 } 2890 }
2893 2891
2894 wm8962->fll_fref = Fref; 2892 wm8962->fll_fref = Fref;