]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] cpufreq_ondemand: add range check
authorDominik Brodowski <linux@dominikbrodowski.net>
Sun, 26 Mar 2006 09:11:03 +0000 (11:11 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Sun, 26 Mar 2006 09:11:03 +0000 (11:11 +0200)
Assert that cpufreq_target is, at least, called with the minimum frequency
allowed by this policy, not something lower. It triggered problems on ARM.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/cpufreq/cpufreq_ondemand.c

index cd846f57147e569c1531c80e727b52f4f0873183..956d121cb16151c2c3f564c4ccabde21250afbac 100644 (file)
@@ -351,6 +351,9 @@ static void dbs_check_cpu(int cpu)
        freq_next = (freq_next * policy->cur) /
                        (dbs_tuners_ins.up_threshold - 10);
 
+       if (freq_next < policy->min)
+               freq_next = policy->min;
+
        if (freq_next <= ((policy->cur * 95) / 100))
                __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L);
 }