aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <[email protected]>2021-02-04 14:17:37 -0600
committerMark Brown <[email protected]>2021-02-05 13:13:20 +0000
commit121871a75ae4032cf5e506ba5159761805709def (patch)
tree553f8180139d5b4857d6e4f63df2f9176952290e
parent737ee8bdf682cedb3c42b713d20ffa5c899591fb (diff)
ASoC: rt711-sdw: use cancel_work_sync() for .remove
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: 501ef013390b ('ASoC: rt711: wait for the delayed work to finish when the system suspends') Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Rander Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/rt711-sdw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c
index fc7df79c3b91..308e62564841 100644
--- a/sound/soc/codecs/rt711-sdw.c
+++ b/sound/soc/codecs/rt711-sdw.c
@@ -463,8 +463,8 @@ static int rt711_sdw_remove(struct sdw_slave *slave)
struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev);
if (rt711 && rt711->hw_init) {
- cancel_delayed_work(&rt711->jack_detect_work);
- cancel_delayed_work(&rt711->jack_btn_check_work);
+ cancel_delayed_work_sync(&rt711->jack_detect_work);
+ cancel_delayed_work_sync(&rt711->jack_btn_check_work);
cancel_work_sync(&rt711->calibration_work);
}