]> git.hungrycats.org Git - linux/commitdiff
[PATCH] use c99 struct initializer in hotcpu_notifier
authorAndrew Morton <akpm@osdl.org>
Thu, 3 Jun 2004 01:04:36 +0000 (18:04 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 01:04:36 +0000 (18:04 -0700)
From: Nathan Lynch <nathanl@austin.ibm.com>

The hotcpu_notifier macro does not properly record the given priority in
the notifier block.  This causes trouble only for callers which specify a
non-zero priority, of which there are none (yet).

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/cpu.h

index 7ca3f486868f4855a1a6436b008562dd45bc2ab4..2c3d97fc570c513fc98d759b4db9b9cbd7ddd08f 100644 (file)
@@ -60,7 +60,8 @@ extern struct semaphore cpucontrol;
 #define unlock_cpu_hotplug()   up(&cpucontrol)
 #define lock_cpu_hotplug_interruptible() down_interruptible(&cpucontrol)
 #define hotcpu_notifier(fn, pri) {                             \
-       static struct notifier_block fn##_nb = { fn, pri };     \
+       static struct notifier_block fn##_nb =                  \
+               { .notifier_call = fn, .priority = pri };       \
        register_cpu_notifier(&fn##_nb);                        \
 }
 int cpu_down(unsigned int cpu);