aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2012-12-17 13:29:20 +0530
committerAndrey Konovalov <andrey.konovalov@linaro.org>2013-05-25 13:27:08 +0400
commitfce6c6884da1ca88973181cb2580b19a39239b6b (patch)
tree17782f23fec32da934942edcf526e1efd0ac01de
parent59cb463c6cf42c9ea62d119043aa79ac6d297af3 (diff)
downloadvexpress-lsk-fce6c6884da1ca88973181cb2580b19a39239b6b.tar.gz
cpufreq: arm_big_little: Use only new_rate instead of max_ and actual_ rate
There is no actual need of keeping two variables here. Lets keep only one of them. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r--drivers/cpufreq/arm_big_little.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index b8a6f17db93..22d04bd196c 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -113,20 +113,20 @@ static unsigned int bL_cpufreq_get_rate(unsigned int cpu)
static unsigned int
bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate)
{
- u32 max_rate, actual_rate;
+ u32 new_rate;
int ret;
if (is_bL_switching_enabled()) {
- max_rate = find_cluster_maxfreq(cpu, new_cluster, rate);
- actual_rate = ACTUAL_FREQ(new_cluster, max_rate);
+ new_rate = find_cluster_maxfreq(cpu, new_cluster, rate);
+ new_rate = ACTUAL_FREQ(new_cluster, new_rate);
} else {
- actual_rate = max_rate = rate;
+ new_rate = rate;
}
pr_debug("%s: cpu: %d, old cluster: %d, new cluster: %d, freq: %d\n",
- __func__, cpu, old_cluster, new_cluster, actual_rate);
+ __func__, cpu, old_cluster, new_cluster, new_rate);
- ret = clk_set_rate(clk[new_cluster], actual_rate * 1000);
+ ret = clk_set_rate(clk[new_cluster], new_rate * 1000);
if (ret) {
pr_err("clk_set_rate failed: %d, new cluster: %d\n", ret,
new_cluster);
@@ -135,15 +135,15 @@ bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate)
/* Recalc freq for old cluster when switching clusters */
if (old_cluster != new_cluster) {
- max_rate = find_cluster_maxfreq(cpu, old_cluster, 0);
- max_rate = ACTUAL_FREQ(old_cluster, max_rate);
+ new_rate = find_cluster_maxfreq(cpu, old_cluster, 0);
+ new_rate = ACTUAL_FREQ(old_cluster, new_rate);
/* Set freq of old cluster if there are cpus left on it */
- if (max_rate) {
+ if (new_rate) {
pr_debug("%s: Updating rate of old cluster: %d, to freq: %d\n",
- __func__, old_cluster, max_rate);
+ __func__, old_cluster, new_rate);
- if (clk_set_rate(clk[old_cluster], max_rate * 1000))
+ if (clk_set_rate(clk[old_cluster], new_rate * 1000))
pr_err("%s: clk_set_rate failed: %d, old cluster: %d\n",
__func__, ret, old_cluster);
}