From a3ef80c4af3a7016295ba449d2a844d54293078c Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 2 Jun 2004 18:04:36 -0700 Subject: [PATCH] [PATCH] use c99 struct initializer in hotcpu_notifier From: Nathan Lynch 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 7ca3f486868f4..2c3d97fc570c5 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -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); -- 2.53.0