mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 09:22:53 -04:00
ASoC: cs35l41: Initialize completion object before requesting IRQ
Technically, an interrupt handler can be called before probe() finishes
its execution, hence ensure the pll_lock completion object is always
initialized before being accessed in cs35l41_irq().
Fixes: f503056493 ("ALSA: cs35l41: Add shared boost feature")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230907171010.1447274-4-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
4bb5870ab6
commit
5ad668a9ce
@@ -1273,6 +1273,8 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *
|
||||
regmap_update_bits(cs35l41->regmap, CS35L41_IRQ1_MASK3, CS35L41_INT3_PLL_LOCK_MASK,
|
||||
0 << CS35L41_INT3_PLL_LOCK_SHIFT);
|
||||
|
||||
init_completion(&cs35l41->pll_lock);
|
||||
|
||||
ret = devm_request_threaded_irq(cs35l41->dev, cs35l41->irq, NULL, cs35l41_irq,
|
||||
IRQF_ONESHOT | IRQF_SHARED | irq_pol,
|
||||
"cs35l41", cs35l41);
|
||||
@@ -1295,8 +1297,6 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
init_completion(&cs35l41->pll_lock);
|
||||
|
||||
pm_runtime_set_autosuspend_delay(cs35l41->dev, 3000);
|
||||
pm_runtime_use_autosuspend(cs35l41->dev);
|
||||
pm_runtime_mark_last_busy(cs35l41->dev);
|
||||
|
||||
Reference in New Issue
Block a user