summaryrefslogtreecommitdiffstats
path: root/include/linux/completion.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-10 04:44:05 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 13:24:14 -0700
commitf86bf9b7bcc5d325687a8b80da8ee3eb56e02da7 (patch)
tree393bf9df55fae3932099fa789d110833c7064ef3 /include/linux/completion.h
parentd6d897cec29252b8d0785198cfa6ca16d30c739d (diff)
downloadop-kernel-dev-f86bf9b7bcc5d325687a8b80da8ee3eb56e02da7.zip
op-kernel-dev-f86bf9b7bcc5d325687a8b80da8ee3eb56e02da7.tar.gz
[PATCH] lockdep: clean up completion initializer in smpboot.c
Clean up lockdep on-stack-completion initializer. (This also removes the dependency on waitqueue_lock_key.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/completion.h')
-rw-r--r--include/linux/completion.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/completion.h b/include/linux/completion.h
index 251c41e..268c5a4a 100644
--- a/include/linux/completion.h
+++ b/include/linux/completion.h
@@ -18,6 +18,9 @@ struct completion {
#define COMPLETION_INITIALIZER(work) \
{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
+#define COMPLETION_INITIALIZER_ONSTACK(work) \
+ ({ init_completion(&work); work; })
+
#define DECLARE_COMPLETION(work) \
struct completion work = COMPLETION_INITIALIZER(work)
@@ -28,7 +31,7 @@ struct completion {
*/
#ifdef CONFIG_LOCKDEP
# define DECLARE_COMPLETION_ONSTACK(work) \
- struct completion work = ({ init_completion(&work); work; })
+ struct completion work = COMPLETION_INITIALIZER_ONSTACK(work)
#else
# define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
#endif
OpenPOWER on IntegriCloud