diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cpufreq.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/cpufreq.c b/kernel/cpufreq.c index 17d2845accfd..de4b015ec9aa 100644 --- a/kernel/cpufreq.c +++ b/kernel/cpufreq.c @@ -350,6 +350,13 @@ static int cpufreq_add_dev (struct device * dev) &cpufreq_driver->policy[cpu], sizeof(struct cpufreq_policy)); + /* 2.4-API init for this CPU */ +#ifdef CONFIG_CPU_FREQ_24_API + cpu_min_freq[cpu] = cpufreq_driver->policy[cpu].cpuinfo.min_freq; + cpu_max_freq[cpu] = cpufreq_driver->policy[cpu].cpuinfo.max_freq; + cpu_cur_freq[cpu] = cpufreq_driver->cpu_cur_freq[cpu]; +#endif + if (cpufreq_driver->target) cpufreq_governor(cpu, CPUFREQ_GOV_START); @@ -359,13 +366,6 @@ static int cpufreq_add_dev (struct device * dev) return -EINVAL; down(&cpufreq_driver_sem); - /* 2.4-API init for this CPU */ -#ifdef CONFIG_CPU_FREQ_24_API - cpu_min_freq[cpu] = cpufreq_driver->policy[cpu].cpuinfo.min_freq; - cpu_max_freq[cpu] = cpufreq_driver->policy[cpu].cpuinfo.max_freq; - cpu_cur_freq[cpu] = cpufreq_driver->cpu_cur_freq[cpu]; -#endif - /* prepare interface data */ cpufreq_driver->policy[cpu].intf.dev = dev; cpufreq_driver->policy[cpu].intf.intf = &cpufreq_interface; |
