]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/cpufreq/cpufreq_conservative.c
[PATCH] powerpc: Fix 64k pages on non-partitioned machines
[mv-sheeva.git] / drivers / cpufreq / cpufreq_conservative.c
index a152d2c46be7592d9f9ea64af4088c984b44f047..e07a35487bde7cf5b713c0c203a4819a537ae901 100644 (file)
@@ -88,6 +88,8 @@ static struct dbs_tuners dbs_tuners_ins = {
        .up_threshold           = DEF_FREQUENCY_UP_THRESHOLD,
        .down_threshold         = DEF_FREQUENCY_DOWN_THRESHOLD,
        .sampling_down_factor   = DEF_SAMPLING_DOWN_FACTOR,
+       .ignore_nice            = 0,
+       .freq_step              = 5,
 };
 
 static inline unsigned int get_cpu_idle_time(unsigned int cpu)
@@ -174,8 +176,7 @@ static ssize_t store_up_threshold(struct cpufreq_policy *unused,
        ret = sscanf (buf, "%u", &input);
 
        mutex_lock(&dbs_mutex);
-       if (ret != 1 || input > 100 || input < 0 ||
-                       input <= dbs_tuners_ins.down_threshold) {
+       if (ret != 1 || input > 100 || input <= dbs_tuners_ins.down_threshold) {
                mutex_unlock(&dbs_mutex);
                return -EINVAL;
        }
@@ -194,8 +195,7 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused,
        ret = sscanf (buf, "%u", &input);
 
        mutex_lock(&dbs_mutex);
-       if (ret != 1 || input > 100 || input < 0 ||
-                       input >= dbs_tuners_ins.up_threshold) {
+       if (ret != 1 || input > 100 || input >= dbs_tuners_ins.up_threshold) {
                mutex_unlock(&dbs_mutex);
                return -EINVAL;
        }
@@ -490,8 +490,6 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
                                def_sampling_rate = MIN_STAT_SAMPLING_RATE;
 
                        dbs_tuners_ins.sampling_rate = def_sampling_rate;
-                       dbs_tuners_ins.ignore_nice = 0;
-                       dbs_tuners_ins.freq_step = 5;
 
                        dbs_timer_init();
                }