diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-11 11:51:26 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-12-13 03:22:44 -0500 |
commit | 5b84ba26a9672e615897234fa5efd3eea2d6b295 (patch) | |
tree | 1d86d5179cefecc986b6c7be0550050c29418869 /sound/pci/ac97 | |
parent | cf7d7e5a1980d1116ee152d25dac382b112b9c17 (diff) |
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>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index a7630e9edf8a..0fc614ce16c1 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1014,8 +1014,7 @@ static int snd_ac97_free(struct snd_ac97 *ac97) | |||
1014 | { | 1014 | { |
1015 | if (ac97) { | 1015 | if (ac97) { |
1016 | #ifdef CONFIG_SND_AC97_POWER_SAVE | 1016 | #ifdef CONFIG_SND_AC97_POWER_SAVE |
1017 | cancel_delayed_work(&ac97->power_work); | 1017 | cancel_delayed_work_sync(&ac97->power_work); |
1018 | flush_scheduled_work(); | ||
1019 | #endif | 1018 | #endif |
1020 | snd_ac97_proc_done(ac97); | 1019 | snd_ac97_proc_done(ac97); |
1021 | if (ac97->bus) | 1020 | if (ac97->bus) |
@@ -2456,8 +2455,7 @@ void snd_ac97_suspend(struct snd_ac97 *ac97) | |||
2456 | if (ac97->build_ops->suspend) | 2455 | if (ac97->build_ops->suspend) |
2457 | ac97->build_ops->suspend(ac97); | 2456 | ac97->build_ops->suspend(ac97); |
2458 | #ifdef CONFIG_SND_AC97_POWER_SAVE | 2457 | #ifdef CONFIG_SND_AC97_POWER_SAVE |
2459 | cancel_delayed_work(&ac97->power_work); | 2458 | cancel_delayed_work_sync(&ac97->power_work); |
2460 | flush_scheduled_work(); | ||
2461 | #endif | 2459 | #endif |
2462 | snd_ac97_powerdown(ac97); | 2460 | snd_ac97_powerdown(ac97); |
2463 | } | 2461 | } |