Skip to content

Commit 5f2df2a

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt700: wait for the delayed work to finish when the system suspends
To avoid the IO error, we need to cancel the delayed work and wait for it to finish. Signed-off-by: Shuming Fan <shumingf@realtek.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200921094244.31869-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 244ac15 commit 5f2df2a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sound/soc/codecs/rt700-sdw.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,9 @@ static int __maybe_unused rt700_dev_suspend(struct device *dev)
490490
if (!rt700->hw_init)
491491
return 0;
492492

493+
cancel_delayed_work_sync(&rt700->jack_detect_work);
494+
cancel_delayed_work_sync(&rt700->jack_btn_check_work);
495+
493496
regcache_cache_only(rt700->regmap, true);
494497

495498
return 0;

0 commit comments

Comments
 (0)