]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - sound/soc/codecs/wm_hubs.c
ASoC: Bail out of wm_hubs DC servo if calibration fails
[net-next-2.6.git] / sound / soc / codecs / wm_hubs.c
index 0ad9f5d536c67bf89afe1172ef863cff2fdfd6d0..486bdd21a98ab9115f6ee6e37133491079d0ca4d 100644 (file)
@@ -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");