mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 09:22:27 +00:00
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 <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
@@ -490,6 +490,9 @@ static int __maybe_unused rt700_dev_suspend(struct device *dev)
|
||||
if (!rt700->hw_init)
|
||||
return 0;
|
||||
|
||||
cancel_delayed_work_sync(&rt700->jack_detect_work);
|
||||
cancel_delayed_work_sync(&rt700->jack_btn_check_work);
|
||||
|
||||
regcache_cache_only(rt700->regmap, true);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user