summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt700-sdw.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2021-02-04 23:17:36 +0300
committerMark Brown <broonie@kernel.org>2021-02-05 16:13:19 +0300
commit737ee8bdf682cedb3c42b713d20ffa5c899591fb (patch)
tree05bcde86b2d9bc87eba6fe1b6beb32247097006f /sound/soc/codecs/rt700-sdw.c
parente681b1a6d706b4e54c3847bb822531b4660234f3 (diff)
downloadlinux-737ee8bdf682cedb3c42b713d20ffa5c899591fb.tar.xz
ASoC: rt700-sdw: use cancel_work_sync() in .remove as well as .suspend
Make sure the workqueues are not running after the .remove() callback, which can lead to timeout errors. A previous fix to use cancel_work_sync was applied for the suspend case but the remove case is missing Fixes: 5f2df2a4583b ('ASoC: rt700: wait for the delayed work to finish when the system suspends') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20210204201739.25206-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt700-sdw.c')
-rw-r--r--sound/soc/codecs/rt700-sdw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c
index fb77e77a4ebd..45488325b635 100644
--- a/sound/soc/codecs/rt700-sdw.c
+++ b/sound/soc/codecs/rt700-sdw.c
@@ -462,8 +462,8 @@ static int rt700_sdw_remove(struct sdw_slave *slave)
struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev);
if (rt700 && rt700->hw_init) {
- cancel_delayed_work(&rt700->jack_detect_work);
- cancel_delayed_work(&rt700->jack_btn_check_work);
+ cancel_delayed_work_sync(&rt700->jack_detect_work);
+ cancel_delayed_work_sync(&rt700->jack_btn_check_work);
}
return 0;