aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-01-31 08:34:38 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:03:28 -0500
commit3b6baa5a0b0a2877c18a76fa1f508cacdbc08edf (patch)
tree93d41b6ec1dfba7c2ffcb65185d6768a5497acc6 /sound/pci
parent965ac42ce919db225ee64678f0be02f2fdf5b5e4 (diff)
[ALSA] Remove delayed work properly at free and suspend
Remove delayed work properly at free and suspend in ac97 codec and ak4114 drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ac97/ac97_codec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 8b7853c14b5b..74ed81081478 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -990,6 +990,7 @@ static int snd_ac97_free(struct snd_ac97 *ac97)
990 if (ac97) { 990 if (ac97) {
991#ifdef CONFIG_SND_AC97_POWER_SAVE 991#ifdef CONFIG_SND_AC97_POWER_SAVE
992 cancel_delayed_work(&ac97->power_work); 992 cancel_delayed_work(&ac97->power_work);
993 flush_scheduled_work();
993#endif 994#endif
994 snd_ac97_proc_done(ac97); 995 snd_ac97_proc_done(ac97);
995 if (ac97->bus) 996 if (ac97->bus)
@@ -2415,6 +2416,10 @@ void snd_ac97_suspend(struct snd_ac97 *ac97)
2415 return; 2416 return;
2416 if (ac97->build_ops->suspend) 2417 if (ac97->build_ops->suspend)
2417 ac97->build_ops->suspend(ac97); 2418 ac97->build_ops->suspend(ac97);
2419#ifdef CONFIG_SND_AC97_POWER_SAVE
2420 cancel_delayed_work(&ac97->power_work);
2421 flush_scheduled_work();
2422#endif
2418 snd_ac97_powerdown(ac97); 2423 snd_ac97_powerdown(ac97);
2419} 2424}
2420 2425