acpi-wmi: Unmark as 'experimental'
[safe/jmp/linux-2.6] / drivers / cpufreq / cpufreq_conservative.c
index 1bba997..0320962 100644 (file)
@@ -333,7 +333,7 @@ static void dbs_check_cpu(int cpu)
 {
        unsigned int idle_ticks, up_idle_ticks, down_idle_ticks;
        unsigned int tmp_idle_ticks, total_idle_ticks;
-       unsigned int freq_step;
+       unsigned int freq_target;
        unsigned int freq_down_sampling_rate;
        struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, cpu);
        struct cpufreq_policy *policy;
@@ -383,13 +383,13 @@ static void dbs_check_cpu(int cpu)
                if (this_dbs_info->requested_freq == policy->max)
                        return;
 
-               freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100;
+               freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;
 
                /* max freq cannot be less than 100. But who knows.... */
-               if (unlikely(freq_step == 0))
-                       freq_step = 5;
+               if (unlikely(freq_target == 0))
+                       freq_target = 5;
 
-               this_dbs_info->requested_freq += freq_step;
+               this_dbs_info->requested_freq += freq_target;
                if (this_dbs_info->requested_freq > policy->max)
                        this_dbs_info->requested_freq = policy->max;
 
@@ -425,19 +425,19 @@ static void dbs_check_cpu(int cpu)
                /*
                 * if we are already at the lowest speed then break out early
                 * or if we 'cannot' reduce the speed as the user might want
-                * freq_step to be zero
+                * freq_target to be zero
                 */
                if (this_dbs_info->requested_freq == policy->min
                                || dbs_tuners_ins.freq_step == 0)
                        return;
 
-               freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100;
+               freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;
 
                /* max freq cannot be less than 100. But who knows.... */
-               if (unlikely(freq_step == 0))
-                       freq_step = 5;
+               if (unlikely(freq_target == 0))
+                       freq_target = 5;
 
-               this_dbs_info->requested_freq -= freq_step;
+               this_dbs_info->requested_freq -= freq_target;
                if (this_dbs_info->requested_freq < policy->min)
                        this_dbs_info->requested_freq = policy->min;
 
@@ -460,6 +460,7 @@ static void do_dbs_timer(struct work_struct *work)
 
 static inline void dbs_timer_init(void)
 {
+       init_timer_deferrable(&dbs_work.timer);
        schedule_delayed_work(&dbs_work,
                        usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
        return;
@@ -497,7 +498,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
                        return rc;
                }
 
-               for_each_cpu_mask(j, policy->cpus) {
+               for_each_cpu(j, policy->cpus) {
                        struct cpu_dbs_info_s *j_dbs_info;
                        j_dbs_info = &per_cpu(cpu_dbs_info, j);
                        j_dbs_info->cur_policy = policy;
@@ -575,13 +576,15 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
        return 0;
 }
 
+#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
+static
+#endif
 struct cpufreq_governor cpufreq_gov_conservative = {
        .name                   = "conservative",
        .governor               = cpufreq_governor_dbs,
        .max_transition_latency = TRANSITION_LATENCY_LIMIT,
        .owner                  = THIS_MODULE,
 };
-EXPORT_SYMBOL(cpufreq_gov_conservative);
 
 static int __init cpufreq_gov_dbs_init(void)
 {
@@ -603,5 +606,9 @@ MODULE_DESCRIPTION ("'cpufreq_conservative' - A dynamic cpufreq governor for "
                "optimised for use in a battery environment");
 MODULE_LICENSE ("GPL");
 
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
+fs_initcall(cpufreq_gov_dbs_init);
+#else
 module_init(cpufreq_gov_dbs_init);
+#endif
 module_exit(cpufreq_gov_dbs_exit);