sound: don't use flush_scheduled_work()
flush_scheduled_work() is deprecated and scheduled to be removed. * cancel[_delayed]_work() + flush_scheduled_work() -> cancel[_delayed]_work_sync(). * wm8350, wm8753 and soc-core use custom code to cancel a delayed work, execute it immediately if it was pending and wait for its completion. This is equivalent to flush_delayed_work_sync(). Use it instead. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -1014,8 +1014,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();
|
||||
cancel_delayed_work_sync(&ac97->power_work);
|
||||
#endif
|
||||
snd_ac97_proc_done(ac97);
|
||||
if (ac97->bus)
|
||||
@@ -2456,8 +2455,7 @@ void snd_ac97_suspend(struct snd_ac97 *ac97)
|
||||
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();
|
||||
cancel_delayed_work_sync(&ac97->power_work);
|
||||
#endif
|
||||
snd_ac97_powerdown(ac97);
|
||||
}
|
||||
|
Reference in New Issue
Block a user