[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>
This commit is contained in:
committed by
Jaroslav Kysela
parent
965ac42ce9
commit
3b6baa5a0b
@ -990,6 +990,7 @@ static int snd_ac97_free(struct snd_ac97 *ac97)
|
||||
if (ac97) {
|
||||
#ifdef CONFIG_SND_AC97_POWER_SAVE
|
||||
cancel_delayed_work(&ac97->power_work);
|
||||
flush_scheduled_work();
|
||||
#endif
|
||||
snd_ac97_proc_done(ac97);
|
||||
if (ac97->bus)
|
||||
@ -2415,6 +2416,10 @@ void snd_ac97_suspend(struct snd_ac97 *ac97)
|
||||
return;
|
||||
if (ac97->build_ops->suspend)
|
||||
ac97->build_ops->suspend(ac97);
|
||||
#ifdef CONFIG_SND_AC97_POWER_SAVE
|
||||
cancel_delayed_work(&ac97->power_work);
|
||||
flush_scheduled_work();
|
||||
#endif
|
||||
snd_ac97_powerdown(ac97);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user