diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index bf8aa45d4f01..291cfe9400a1 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -393,8 +393,15 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) | |||
393 | * policy. To be safe, we focus 10 points under the threshold. | 393 | * policy. To be safe, we focus 10 points under the threshold. |
394 | */ | 394 | */ |
395 | if (load < (dbs_tuners_ins.up_threshold - 10)) { | 395 | if (load < (dbs_tuners_ins.up_threshold - 10)) { |
396 | unsigned int freq_next = (policy->cur * load) / | 396 | unsigned int freq_next, freq_cur; |
397 | |||
398 | freq_cur = cpufreq_driver_getavg(policy); | ||
399 | if (!freq_cur) | ||
400 | freq_cur = policy->cur; | ||
401 | |||
402 | freq_next = (freq_cur * load) / | ||
397 | (dbs_tuners_ins.up_threshold - 10); | 403 | (dbs_tuners_ins.up_threshold - 10); |
404 | |||
398 | if (!dbs_tuners_ins.powersave_bias) { | 405 | if (!dbs_tuners_ins.powersave_bias) { |
399 | __cpufreq_driver_target(policy, freq_next, | 406 | __cpufreq_driver_target(policy, freq_next, |
400 | CPUFREQ_RELATION_L); | 407 | CPUFREQ_RELATION_L); |