Skip to content

Commit 501ef01

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt711: 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/20200921094308.31921-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent cadab0a commit 501ef01

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sound/soc/codecs/rt711-sdw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ static int __maybe_unused rt711_dev_suspend(struct device *dev)
491491
if (!rt711->hw_init)
492492
return 0;
493493

494+
cancel_delayed_work_sync(&rt711->jack_detect_work);
495+
cancel_delayed_work_sync(&rt711->jack_btn_check_work);
496+
cancel_work_sync(&rt711->calibration_work);
497+
494498
regcache_cache_only(rt711->regmap, true);
495499

496500
return 0;

0 commit comments

Comments
 (0)