aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index a18cfbf021b3..a16a5b8c1dc5 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -137,10 +137,21 @@ dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
137 struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, 137 struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info,
138 freq->cpu); 138 freq->cpu);
139 139
140 struct cpufreq_policy *policy;
141
140 if (!this_dbs_info->enable) 142 if (!this_dbs_info->enable)
141 return 0; 143 return 0;
142 144
143 this_dbs_info->requested_freq = freq->new; 145 policy = this_dbs_info->cur_policy;
146
147 /*
148 * we only care if our internally tracked freq moves outside
149 * the 'valid' ranges of freqency available to us otherwise
150 * we do not change it
151 */
152 if (this_dbs_info->requested_freq > policy->max
153 || this_dbs_info->requested_freq < policy->min)
154 this_dbs_info->requested_freq = freq->new;
144 155
145 return 0; 156 return 0;
146} 157}