summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2017-04-25 15:57:13 +0530
committerEduardo Valentin <edubezval@gmail.com>2017-05-27 17:32:20 -0700
commit18f301c934db0f7bae4e7c12e941bce11d67aec5 (patch)
tree73ccd35b23ef5e23f38d84faeba7dda560db11a6
parent3e08b2df12983159ea2d9a1aa2b2bc601093b3cb (diff)
downloadlinux-18f301c934db0f7bae4e7c12e941bce11d67aec5.tar.bz2
thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state()
'cpu' is used at only one place and there is no need to keep a separate variable for it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Tested-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/cpu_cooling.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 1f4b6a719d05..002b48dc6bea 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -456,7 +456,6 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state)
{
struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
- unsigned int cpu = cpumask_any(&cpufreq_cdev->allowed_cpus);
unsigned int clip_freq;
/* Request state should be less than max_level */
@@ -471,7 +470,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
cpufreq_cdev->cpufreq_state = state;
cpufreq_cdev->clipped_freq = clip_freq;
- cpufreq_update_policy(cpu);
+ cpufreq_update_policy(cpumask_any(&cpufreq_cdev->allowed_cpus));
return 0;
}