Unverified Commit 5f2df2a4 authored by Shuming Fan's avatar Shuming Fan Committed by Mark Brown
Browse files

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: default avatarShuming Fan <shumingf@realtek.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200921094244.31869-1-shumingf@realtek.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 244ac15d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;