summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-18 12:25:35 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-19 11:17:36 +0000
commit6937c947d31186750f72c9f8c942bbcc6fe63585 (patch)
tree739659b89699c586727252b5d6b58a6d4453e7b5 /sound
parentfdb6b1e195757a66670801702e4b5fcc66ed3d72 (diff)
downloadlinux-6937c947d31186750f72c9f8c942bbcc6fe63585.tar.bz2
ASoC: Bail out of wm_hubs DC servo if calibration fails
We're keeping track of the number of times we've iterated but never actually using this to bail out if the chip looks stuck. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm_hubs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index 0ad9f5d536c6..486bdd21a98a 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -74,7 +74,7 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec)
msleep(1);
reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_0);
dev_dbg(codec->dev, "DC servo: %x\n", reg);
- } while (reg & WM8993_DCS_DATAPATH_BUSY);
+ } while (reg & WM8993_DCS_DATAPATH_BUSY && count < 400);
if (reg & WM8993_DCS_DATAPATH_BUSY)
dev_err(codec->dev, "Timed out waiting for DC Servo\n");