diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-11-14 17:32:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 19:32:21 -0500 |
commit | 16735d022f72b20ddbb2274b8e109f69575e9b2b (patch) | |
tree | f567c7dfff06ae18899feab7cd8a79a7a0f7be40 /drivers/base/power | |
parent | c32f74ab2872994bc8336ed367313da3139350ca (diff) |
tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.
[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index ee039afe9078..c12e9b9556be 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -757,7 +757,7 @@ void dpm_resume(pm_message_t state) | |||
757 | async_error = 0; | 757 | async_error = 0; |
758 | 758 | ||
759 | list_for_each_entry(dev, &dpm_suspended_list, power.entry) { | 759 | list_for_each_entry(dev, &dpm_suspended_list, power.entry) { |
760 | INIT_COMPLETION(dev->power.completion); | 760 | reinit_completion(&dev->power.completion); |
761 | if (is_async(dev)) { | 761 | if (is_async(dev)) { |
762 | get_device(dev); | 762 | get_device(dev); |
763 | async_schedule(async_resume, dev); | 763 | async_schedule(async_resume, dev); |
@@ -1237,7 +1237,7 @@ static void async_suspend(void *data, async_cookie_t cookie) | |||
1237 | 1237 | ||
1238 | static int device_suspend(struct device *dev) | 1238 | static int device_suspend(struct device *dev) |
1239 | { | 1239 | { |
1240 | INIT_COMPLETION(dev->power.completion); | 1240 | reinit_completion(&dev->power.completion); |
1241 | 1241 | ||
1242 | if (pm_async_enabled && dev->power.async_suspend) { | 1242 | if (pm_async_enabled && dev->power.async_suspend) { |
1243 | get_device(dev); | 1243 | get_device(dev); |