aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/cpufreq_cooling.c')
-rw-r--r--drivers/thermal/cpufreq_cooling.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
index cc2959f22f01..612f063c1cfc 100644
--- a/drivers/thermal/cpufreq_cooling.c
+++ b/drivers/thermal/cpufreq_cooling.c
@@ -438,13 +438,11 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
438 if (cpufreq_cdev->cpufreq_state == state) 438 if (cpufreq_cdev->cpufreq_state == state)
439 return 0; 439 return 0;
440 440
441 cpufreq_cdev->cpufreq_state = state;
442
443 frequency = get_state_freq(cpufreq_cdev, state); 441 frequency = get_state_freq(cpufreq_cdev, state);
444 442
445 ret = freq_qos_update_request(&cpufreq_cdev->qos_req, frequency); 443 ret = freq_qos_update_request(&cpufreq_cdev->qos_req, frequency);
446
447 if (ret > 0) { 444 if (ret > 0) {
445 cpufreq_cdev->cpufreq_state = state;
448 cpus = cpufreq_cdev->policy->cpus; 446 cpus = cpufreq_cdev->policy->cpus;
449 max_capacity = arch_scale_cpu_capacity(cpumask_first(cpus)); 447 max_capacity = arch_scale_cpu_capacity(cpumask_first(cpus));
450 capacity = frequency * max_capacity; 448 capacity = frequency * max_capacity;