aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Keepax <[email protected]>2024-02-02 14:06:18 +0000
committerMark Brown <[email protected]>2024-02-05 14:32:25 +0000
commit7fa1a01ba6cb64bc24e7ba0dbee589f3f09f3cf7 (patch)
treea13248598aae64ff48e5f2e066970dfb2de359dc
parentcd2a2388614fcf2b9b626332c0da53a2c6cbf2ee (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/cs42l43.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c
index 9e1deb3242cb..c84d5952cdb5 100644
--- a/sound/soc/codecs/cs42l43.c
+++ b/sound/soc/codecs/cs42l43.c
@@ -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;
}