aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBard liao <[email protected]>2019-11-11 16:21:52 -0600
committerMark Brown <[email protected]>2019-11-12 12:08:10 +0000
commit24de63562b9da9fb3145329abb226ab623e6af19 (patch)
tree37426a73e96f6f8481bc06a2fb6438d69ef664ef
parente7cfd867fd9842f346688f28412eb83dec342900 (diff)
ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null
jack_detect_work will be triggered by rt5682_irq. We should cancel it if hs_jack is set to null. Signed-off-by: Bard liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/rt5682.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index c50b75ce82e0..62b8ed412bd1 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -1002,6 +1002,7 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component,
RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
RT5682_POW_JDH | RT5682_POW_JDL, 0);
+ cancel_delayed_work_sync(&rt5682->jack_detect_work);
return 0;
}