From: Mark Brown Date: Thu, 18 Mar 2010 12:25:35 +0000 (+0000) Subject: ASoC: Bail out of wm_hubs DC servo if calibration fails X-Git-Tag: v2.6.34-rc3~46^2~1^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6937c947d31186750f72c9f8c942bbcc6fe63585;p=~shefty%2Frdma-dev.git 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 Acked-by: Liam Girdwood --- diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 0ad9f5d536c..486bdd21a98 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");