Commit 84aac6c7 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mark Brown

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: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent b51600c0
...@@ -496,7 +496,10 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev) ...@@ -496,7 +496,10 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
return err; return err;
priv->extclk = devm_clk_get(&pdev->dev, "extclk"); priv->extclk = devm_clk_get(&pdev->dev, "extclk");
if (!IS_ERR(priv->extclk)) { if (IS_ERR(priv->extclk)) {
if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
return -EPROBE_DEFER;
} else {
if (priv->extclk == priv->clk) { if (priv->extclk == priv->clk) {
devm_clk_put(&pdev->dev, priv->extclk); devm_clk_put(&pdev->dev, priv->extclk);
priv->extclk = ERR_PTR(-EINVAL); priv->extclk = ERR_PTR(-EINVAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment