Commit 649bbaa4 authored by Chandra Seetharaman's avatar Chandra Seetharaman Committed by Linus Torvalds

[PATCH] Remove __devinitdata from notifier block definitions

Few of the notifier_chain_register() callers use __devinitdata in the
definition of notifier_block data structure.  It is incorrect as the
data structure should be available after the initializations (they do
not unregister them during initializations).

This was leading to an oops when notifier_chain_register() call is
invoked for those callback chains after initialization.

This patch fixes all such usages to _not_ have the notifier_block data
structure in the init data section.
Signed-off-by: default avatarChandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e7edf9cd
...@@ -297,7 +297,7 @@ static int __devinit sysfs_cpu_notify(struct notifier_block *self, ...@@ -297,7 +297,7 @@ static int __devinit sysfs_cpu_notify(struct notifier_block *self,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __devinitdata sysfs_cpu_nb = { static struct notifier_block sysfs_cpu_nb = {
.notifier_call = sysfs_cpu_notify, .notifier_call = sysfs_cpu_notify,
}; };
......
...@@ -652,7 +652,7 @@ appldata_cpu_notify(struct notifier_block *self, ...@@ -652,7 +652,7 @@ appldata_cpu_notify(struct notifier_block *self,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __devinitdata appldata_nb = { static struct notifier_block appldata_nb = {
.notifier_call = appldata_cpu_notify, .notifier_call = appldata_cpu_notify,
}; };
......
...@@ -3385,7 +3385,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action, ...@@ -3385,7 +3385,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action,
} }
static struct notifier_block __devinitdata blk_cpu_notifier = { static struct notifier_block blk_cpu_notifier = {
.notifier_call = blk_cpu_notify, .notifier_call = blk_cpu_notify,
}; };
......
...@@ -860,7 +860,7 @@ static int __devinit hrtimer_cpu_notify(struct notifier_block *self, ...@@ -860,7 +860,7 @@ static int __devinit hrtimer_cpu_notify(struct notifier_block *self,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __devinitdata hrtimers_nb = { static struct notifier_block hrtimers_nb = {
.notifier_call = hrtimer_cpu_notify, .notifier_call = hrtimer_cpu_notify,
}; };
......
...@@ -537,7 +537,7 @@ static int __devinit rcu_cpu_notify(struct notifier_block *self, ...@@ -537,7 +537,7 @@ static int __devinit rcu_cpu_notify(struct notifier_block *self,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __devinitdata rcu_nb = { static struct notifier_block rcu_nb = {
.notifier_call = rcu_cpu_notify, .notifier_call = rcu_cpu_notify,
}; };
......
...@@ -4814,7 +4814,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action, ...@@ -4814,7 +4814,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action,
/* Register at highest priority so that task migration (migrate_all_tasks) /* Register at highest priority so that task migration (migrate_all_tasks)
* happens before everything else. * happens before everything else.
*/ */
static struct notifier_block __devinitdata migration_notifier = { static struct notifier_block migration_notifier = {
.notifier_call = migration_call, .notifier_call = migration_call,
.priority = 10 .priority = 10
}; };
......
...@@ -484,7 +484,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb, ...@@ -484,7 +484,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __devinitdata cpu_nfb = { static struct notifier_block cpu_nfb = {
.notifier_call = cpu_callback .notifier_call = cpu_callback
}; };
......
...@@ -140,7 +140,7 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) ...@@ -140,7 +140,7 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __devinitdata cpu_nfb = { static struct notifier_block cpu_nfb = {
.notifier_call = cpu_callback .notifier_call = cpu_callback
}; };
......
...@@ -1334,7 +1334,7 @@ static int __devinit timer_cpu_notify(struct notifier_block *self, ...@@ -1334,7 +1334,7 @@ static int __devinit timer_cpu_notify(struct notifier_block *self,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __devinitdata timers_nb = { static struct notifier_block timers_nb = {
.notifier_call = timer_cpu_notify, .notifier_call = timer_cpu_notify,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment