未验证 提交 1ca1156c 编写于 作者: A Annaliese McDermond 提交者: Mark Brown

ASoC: tlv320aic32x4: Register clocks before registering component

Clock registration must be performed before the component is
registered.  aic32x4_component_probe attempts to get all the
clocks right off the bat.  If the component is registered before
the clocks there is a race condition where the clocks may not
be registered by the time aic32x4_componet_probe actually runs.

Fixes: d1c859d3 ("ASoC: codec: tlv3204: Increased maximum supported channels")
Cc: stable@vger.kernel.org
Signed-off-by: NAnnaliese McDermond <nh6z@nh6z.net>
Link: https://lore.kernel.org/r/0101017889850206-dcac4cce-8cc8-4a21-80e9-4e4bef44b981-000000@us-west-2.amazonses.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 29654ed8
...@@ -1243,6 +1243,10 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) ...@@ -1243,6 +1243,10 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
if (ret) if (ret)
goto err_disable_regulators; goto err_disable_regulators;
ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
if (ret)
goto err_disable_regulators;
ret = devm_snd_soc_register_component(dev, ret = devm_snd_soc_register_component(dev,
&soc_component_dev_aic32x4, &aic32x4_dai, 1); &soc_component_dev_aic32x4, &aic32x4_dai, 1);
if (ret) { if (ret) {
...@@ -1250,10 +1254,6 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) ...@@ -1250,10 +1254,6 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
goto err_disable_regulators; goto err_disable_regulators;
} }
ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
if (ret)
goto err_disable_regulators;
return 0; return 0;
err_disable_regulators: err_disable_regulators:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册