Commit 501ef013 authored by Shuming Fan's avatar Shuming Fan Committed by Mark Brown

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: default avatarShuming Fan <shumingf@realtek.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200921094308.31921-1-shumingf@realtek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent cadab0ae
...@@ -491,6 +491,10 @@ static int __maybe_unused rt711_dev_suspend(struct device *dev) ...@@ -491,6 +491,10 @@ static int __maybe_unused rt711_dev_suspend(struct device *dev)
if (!rt711->hw_init) if (!rt711->hw_init)
return 0; return 0;
cancel_delayed_work_sync(&rt711->jack_detect_work);
cancel_delayed_work_sync(&rt711->jack_btn_check_work);
cancel_work_sync(&rt711->calibration_work);
regcache_cache_only(rt711->regmap, true); regcache_cache_only(rt711->regmap, true);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment