Skip to content

Commit

Permalink
ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null
Browse files Browse the repository at this point in the history
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 <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191111222152.19723-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Bard liao authored and Mark Brown committed Nov 12, 2019
1 parent e7cfd86 commit 24de635
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/codecs/rt5682.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 24de635

Please sign in to comment.