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/i2c | |
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/i2c')
-rw-r--r-- | sound/i2c/other/ak4113.c | 5 | ||||
-rw-r--r-- | sound/i2c/other/ak4114.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c index 971a84a4fa77..c424d329f806 100644 --- a/sound/i2c/other/ak4113.c +++ b/sound/i2c/other/ak4113.c | |||
@@ -57,8 +57,7 @@ static void snd_ak4113_free(struct ak4113 *chip) | |||
57 | { | 57 | { |
58 | chip->init = 1; /* don't schedule new work */ | 58 | chip->init = 1; /* don't schedule new work */ |
59 | mb(); | 59 | mb(); |
60 | cancel_delayed_work(&chip->work); | 60 | cancel_delayed_work_sync(&chip->work); |
61 | flush_scheduled_work(); | ||
62 | kfree(chip); | 61 | kfree(chip); |
63 | } | 62 | } |
64 | 63 | ||
@@ -141,7 +140,7 @@ void snd_ak4113_reinit(struct ak4113 *chip) | |||
141 | { | 140 | { |
142 | chip->init = 1; | 141 | chip->init = 1; |
143 | mb(); | 142 | mb(); |
144 | flush_scheduled_work(); | 143 | flush_delayed_work_sync(&chip->work); |
145 | ak4113_init_regs(chip); | 144 | ak4113_init_regs(chip); |
146 | /* bring up statistics / event queing */ | 145 | /* bring up statistics / event queing */ |
147 | chip->init = 0; | 146 | chip->init = 0; |
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index 0341451f814c..d9fb537b0b94 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c | |||
@@ -67,8 +67,7 @@ static void snd_ak4114_free(struct ak4114 *chip) | |||
67 | { | 67 | { |
68 | chip->init = 1; /* don't schedule new work */ | 68 | chip->init = 1; /* don't schedule new work */ |
69 | mb(); | 69 | mb(); |
70 | cancel_delayed_work(&chip->work); | 70 | cancel_delayed_work_sync(&chip->work); |
71 | flush_scheduled_work(); | ||
72 | kfree(chip); | 71 | kfree(chip); |
73 | } | 72 | } |
74 | 73 | ||
@@ -154,7 +153,7 @@ void snd_ak4114_reinit(struct ak4114 *chip) | |||
154 | { | 153 | { |
155 | chip->init = 1; | 154 | chip->init = 1; |
156 | mb(); | 155 | mb(); |
157 | flush_scheduled_work(); | 156 | flush_delayed_work_sync(&chip->work); |
158 | ak4114_init_regs(chip); | 157 | ak4114_init_regs(chip); |
159 | /* bring up statistics / event queing */ | 158 | /* bring up statistics / event queing */ |
160 | chip->init = 0; | 159 | chip->init = 0; |