Commit 3ef9f445 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: cs42l43: Shut down jack detection on component remove

Disable the jack detection and sync in any currently running work when
the component is removed.
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240202140619.1068560-3-ckeepax@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7fa1a01b
......@@ -2115,6 +2115,13 @@ static void cs42l43_component_remove(struct snd_soc_component *component)
{
struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component);
cs42l43_set_jack(priv->component, NULL, NULL);
cancel_delayed_work_sync(&priv->bias_sense_timeout);
cancel_delayed_work_sync(&priv->tip_sense_work);
cancel_delayed_work_sync(&priv->button_press_work);
cancel_work_sync(&priv->button_release_work);
cancel_work_sync(&priv->hp_ilimit_work);
cancel_delayed_work_sync(&priv->hp_ilimit_clear_work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment