mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
ASoC: cs42l43: Sync the hp ilimit works when removing the component
Synchronise the headphone ilimit work functions when removing the component. These can only trigger whilst the headphone is enabled which shouldn't be possible once the component is removed but the works rely on the stashed component pointer so they should be shut down before the code moves on from component remove. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240202140619.1068560-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
cd2a238861
commit
7fa1a01ba6
1 changed files with 3 additions and 0 deletions
|
@ -2115,6 +2115,9 @@ static void cs42l43_component_remove(struct snd_soc_component *component)
|
|||
{
|
||||
struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component);
|
||||
|
||||
cancel_work_sync(&priv->hp_ilimit_work);
|
||||
cancel_delayed_work_sync(&priv->hp_ilimit_clear_work);
|
||||
|
||||
priv->component = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue