[PATCH RESEND] ASoC: rt5663: add cancel_delayed_work_sync when system suspends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Shuming Fan <shumingf@xxxxxxxxxxx>

This patch makes sure that the workqueue is completed before the system suspends.

Change-Id: Ib8df80dcb4188f4556e9473364f2184a76c81c01
Signed-off-by: Shuming Fan <shumingf@xxxxxxxxxxx>
---
 sound/soc/codecs/rt5663.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index 77246f84de29..907f537c97ef 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -3186,6 +3186,9 @@ static int rt5663_suspend(struct snd_soc_component *component)
 {
 	struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component);
 
+	cancel_delayed_work_sync(&rt5663->jack_detect_work);
+	cancel_delayed_work_sync(&rt5663->jd_unplug_work);
+
 	regcache_cache_only(rt5663->regmap, true);
 	regcache_mark_dirty(rt5663->regmap);
 
-- 
2.34.1





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux