diff options
| author | Saravana Kannan <skannan@codeaurora.org> | 2014-02-13 19:08:21 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 19:58:45 -0700 |
| commit | 2eb27275fc723de7e67be7e9d4fc0e8a0c69d081 (patch) | |
| tree | 52a7736352ea1ff656eb02539c85a8051464e089 | |
| parent | 2f97ec6d6edc15410a38738dc21674e2bf020f13 (diff) | |
cpufreq: cpu-boost: Don't register for cpufreq notifiers too early
The cpufreq notifiers should be registered only after all the data
structures used in the notifier callbacks have been initialized. So, move
the cpufreq notifier registration to a later point in the init function.
Change-Id: I043ab5bc0ebb98164c40549fe151a8d801c8c186
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
| -rw-r--r-- | drivers/cpufreq/cpu-boost.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpu-boost.c b/drivers/cpufreq/cpu-boost.c index 179cb179b019..f6695636435f 100644 --- a/drivers/cpufreq/cpu-boost.c +++ b/drivers/cpufreq/cpu-boost.c @@ -338,8 +338,6 @@ static int cpu_boost_init(void) int cpu, ret; struct cpu_sync *s; - cpufreq_register_notifier(&boost_adjust_nb, CPUFREQ_POLICY_NOTIFIER); - cpu_boost_wq = alloc_workqueue("cpuboost_wq", WQ_HIGHPRI, 0); if (!cpu_boost_wq) return -EFAULT; @@ -357,10 +355,11 @@ static int cpu_boost_init(void) "boost_sync/%d", cpu); set_cpus_allowed(s->thread, *cpumask_of(cpu)); } + cpufreq_register_notifier(&boost_adjust_nb, CPUFREQ_POLICY_NOTIFIER); atomic_notifier_chain_register(&migration_notifier_head, &boost_migration_nb); - ret = input_register_handler(&cpuboost_input_handler); + return 0; } late_initcall(cpu_boost_init); |
