]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sparc64: Fix cpufreq notifier registry.
authorDavid S. Miller <davem@davemloft.net>
Wed, 23 Jul 2008 23:21:07 +0000 (16:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jul 2008 23:21:07 +0000 (16:21 -0700)
Based upon a report by Daniel Smolik.

We do it too early, which triggers a BUG in
cpufreq_register_notifier().

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/time.c

index bedc4c159b1c8e29cee6d346619d66c389d9a5f3..a0c6a97eec6ee5883968a6fe313b0aa467fafb56 100644 (file)
@@ -884,6 +884,16 @@ static struct notifier_block sparc64_cpufreq_notifier_block = {
        .notifier_call  = sparc64_cpufreq_notifier
 };
 
+static int __init register_sparc64_cpufreq_notifier(void)
+{
+
+       cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
+                                 CPUFREQ_TRANSITION_NOTIFIER);
+       return 0;
+}
+
+core_initcall(register_sparc64_cpufreq_notifier);
+
 #endif /* CONFIG_CPU_FREQ */
 
 static int sparc64_next_event(unsigned long delta,
@@ -1050,11 +1060,6 @@ void __init time_init(void)
               sparc64_clockevent.mult, sparc64_clockevent.shift);
 
        setup_sparc64_timer();
-
-#ifdef CONFIG_CPU_FREQ
-       cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
-                                 CPUFREQ_TRANSITION_NOTIFIER);
-#endif
 }
 
 unsigned long long sched_clock(void)