diff options
author | Shuming Fan <shumingf@realtek.com> | 2020-09-21 11:43:08 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-21 21:40:55 +0200 |
commit | 501ef013390b774e8e61000a78d1d640d6c3411d (patch) | |
tree | 1aa91a232a8c28358d00bd9362c5a931d99044e2 /sound/soc/codecs/rt711-sdw.c | |
parent | ASoC: tas2770: Fix error handling with update_bits (diff) | |
download | linux-501ef013390b774e8e61000a78d1d640d6c3411d.tar.xz linux-501ef013390b774e8e61000a78d1d640d6c3411d.zip |
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>
Diffstat (limited to 'sound/soc/codecs/rt711-sdw.c')
-rw-r--r-- | sound/soc/codecs/rt711-sdw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index 7efff130a638..9eabd30521c7 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -491,6 +491,10 @@ static int __maybe_unused rt711_dev_suspend(struct device *dev) if (!rt711->hw_init) 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); return 0; |