mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ASoC: kirkwood: fix external clock probe defer
[ Upstream commit4523817d51] When our call to get the external clock fails, we forget to clean up the enabled internal clock correctly. Enable the clock after we have obtained all our resources. Fixes:84aac6c79b("ASoC: kirkwood: fix loss of external clock at probe time") Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Link: https://lore.kernel.org/r/E1iNGyK-0004oF-6A@rmk-PC.armlinux.org.uk Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a2c2cf16b0
commit
6a7472add3
@@ -563,10 +563,6 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(priv->clk);
|
||||
}
|
||||
|
||||
err = clk_prepare_enable(priv->clk);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
priv->extclk = devm_clk_get(&pdev->dev, "extclk");
|
||||
if (IS_ERR(priv->extclk)) {
|
||||
if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
|
||||
@@ -582,6 +578,10 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
err = clk_prepare_enable(priv->clk);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* Some sensible defaults - this reflects the powerup values */
|
||||
priv->ctl_play = KIRKWOOD_PLAYCTL_SIZE_24;
|
||||
priv->ctl_rec = KIRKWOOD_RECCTL_SIZE_24;
|
||||
|
||||
Reference in New Issue
Block a user