Skip to contentSkip to conversation

ASoC: kirkwood: fix loss of external clock at probe time

PATCH In review Jean-Francois Moine 2 participants 2 messages Sep 21, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/2 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.

---
 sound/soc/kirkwood/kirkwood-i2s.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/kirkwood/kirkwood-i2s.c +4 -1
index 0f3d73d..14f32d9 100644
@@ -496,7 +496,10 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
 		return err;
 
 	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) {
 			devm_clk_put(&pdev->dev, priv->extclk);
 			priv->extclk = ERR_PTR(-EINVAL);
Signature · 6 lines
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#1 lore raw
Quoted 4 lines · Jean-Francois Moine

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.

Applied, thanks. It won't do anything without a version of patch 1 but
there's no build time dependency and it seems like we should get a fix
into the core for the unspecified vs unregistered problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130921/a2041cbe/attachment.sig>