diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm5100.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index ea09db585aa1..96740379b711 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c | |||
@@ -1762,6 +1762,7 @@ static int wm5100_set_fll(struct snd_soc_codec *codec, int fll_id, int source, | |||
1762 | struct _fll_div factors; | 1762 | struct _fll_div factors; |
1763 | struct wm5100_fll *fll; | 1763 | struct wm5100_fll *fll; |
1764 | int ret, base, lock, i, timeout; | 1764 | int ret, base, lock, i, timeout; |
1765 | unsigned long time_left; | ||
1765 | 1766 | ||
1766 | switch (fll_id) { | 1767 | switch (fll_id) { |
1767 | case WM5100_FLL1: | 1768 | case WM5100_FLL1: |
@@ -1842,9 +1843,9 @@ static int wm5100_set_fll(struct snd_soc_codec *codec, int fll_id, int source, | |||
1842 | /* Poll for the lock; will use interrupt when we can test */ | 1843 | /* Poll for the lock; will use interrupt when we can test */ |
1843 | for (i = 0; i < timeout; i++) { | 1844 | for (i = 0; i < timeout; i++) { |
1844 | if (i2c->irq) { | 1845 | if (i2c->irq) { |
1845 | ret = wait_for_completion_timeout(&fll->lock, | 1846 | time_left = wait_for_completion_timeout(&fll->lock, |
1846 | msecs_to_jiffies(25)); | 1847 | msecs_to_jiffies(25)); |
1847 | if (ret > 0) | 1848 | if (time_left > 0) |
1848 | break; | 1849 | break; |
1849 | } else { | 1850 | } else { |
1850 | msleep(1); | 1851 | msleep(1); |