aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-26 04:11:03 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-26 04:11:03 -0500
commit7c9d8c0e84d395a01289ebd1597758939a875a86 (patch)
tree7cdb1540d4e791d6e2e0a63c9a62ecf8ceccd0f9 /drivers
parent9cbad61b41f0b6f0a4c600fe96d8292ffd592b50 (diff)
[PATCH] cpufreq_ondemand: add range check
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index cd846f57147e..956d121cb161 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -351,6 +351,9 @@ static void dbs_check_cpu(int cpu)
351 freq_next = (freq_next * policy->cur) / 351 freq_next = (freq_next * policy->cur) /
352 (dbs_tuners_ins.up_threshold - 10); 352 (dbs_tuners_ins.up_threshold - 10);
353 353
354 if (freq_next < policy->min)
355 freq_next = policy->min;
356
354 if (freq_next <= ((policy->cur * 95) / 100)) 357 if (freq_next <= ((policy->cur * 95) / 100))
355 __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L); 358 __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L);
356} 359}