From: Chandra Seetharaman cpufreq_register_driver() has to made available at all time (not init only). Hence, we should be using hotplug version of the cpu notifier register/unregister function instead of the _init time only_ version. Signed-off-by: Chandra Seetharaman Signed-off-by: Andrew Morton --- drivers/cpufreq/cpufreq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -puN drivers/cpufreq/cpufreq.c~cpu-hotplug-make-register_cpu_notifier-init-time-only-fix-fix drivers/cpufreq/cpufreq.c --- a/drivers/cpufreq/cpufreq.c~cpu-hotplug-make-register_cpu_notifier-init-time-only-fix-fix +++ a/drivers/cpufreq/cpufreq.c @@ -1497,7 +1497,8 @@ int cpufreq_update_policy(unsigned int c } EXPORT_SYMBOL(cpufreq_update_policy); -static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb, +#ifdef CONFIG_HOTPLUG_CPU +static int cpufreq_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -1536,6 +1537,7 @@ static struct notifier_block cpufreq_cpu { .notifier_call = cpufreq_cpu_callback, }; +#endif /* CONFIG_HOTPLUG_CPU */ /********************************************************************* * REGISTER / UNREGISTER CPUFREQ DRIVER * @@ -1596,7 +1598,7 @@ int cpufreq_register_driver(struct cpufr } if (!ret) { - register_cpu_notifier(&cpufreq_cpu_notifier); + register_hotcpu_notifier(&cpufreq_cpu_notifier); dprintk("driver %s up and running\n", driver_data->name); cpufreq_debug_enable_ratelimit(); } @@ -1628,7 +1630,7 @@ int cpufreq_unregister_driver(struct cpu dprintk("unregistering driver %s\n", driver->name); sysdev_driver_unregister(&cpu_sysdev_class, &cpufreq_sysdev_driver); - unregister_cpu_notifier(&cpufreq_cpu_notifier); + unregister_hotcpu_notifier(&cpufreq_cpu_notifier); spin_lock_irqsave(&cpufreq_driver_lock, flags); cpufreq_driver = NULL; _