aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/kirkwood/kirkwood-i2s.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2013-09-21 06:00:36 -0400
committerMark Brown <broonie@linaro.org>2013-09-21 09:31:10 -0400
commit84aac6c79bfdcfbcd8541c814b365c3001cdf5e6 (patch)
tree92447ad11e635852be1d0742776dd928c1b96054 /sound/soc/kirkwood/kirkwood-i2s.c
parentb51600c01979ab1d1c4df17e8910696547ffb9a2 (diff)
ASoC: kirkwood: fix loss of external clock at probe time
At probe time, when the clock driver is not yet initialized, the external clock of the kirkwood sound device will not be usable. This patch fixes this problem defering the device probe. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-i2s.c')
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 0f3d73d4ef48..3e59af983527 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -496,7 +496,10 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
496 return err; 496 return err;
497 497
498 priv->extclk = devm_clk_get(&pdev->dev, "extclk"); 498 priv->extclk = devm_clk_get(&pdev->dev, "extclk");
499 if (!IS_ERR(priv->extclk)) { 499 if (IS_ERR(priv->extclk)) {
500 if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
501 return -EPROBE_DEFER;
502 } else {
500 if (priv->extclk == priv->clk) { 503 if (priv->extclk == priv->clk) {
501 devm_clk_put(&pdev->dev, priv->extclk); 504 devm_clk_put(&pdev->dev, priv->extclk);
502 priv->extclk = ERR_PTR(-EINVAL); 505 priv->extclk = ERR_PTR(-EINVAL);