diff options
Diffstat (limited to 'drivers/thermal/cpu_cooling.c')
| -rw-r--r-- | drivers/thermal/cpu_cooling.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 6fff16113628..f7c1f49ec87f 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c | |||
| @@ -536,12 +536,11 @@ static int cpufreq_power2state(struct thermal_cooling_device *cdev, | |||
| 536 | struct thermal_zone_device *tz, u32 power, | 536 | struct thermal_zone_device *tz, u32 power, |
| 537 | unsigned long *state) | 537 | unsigned long *state) |
| 538 | { | 538 | { |
| 539 | unsigned int cur_freq, target_freq; | 539 | unsigned int target_freq; |
| 540 | u32 last_load, normalised_power; | 540 | u32 last_load, normalised_power; |
| 541 | struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata; | 541 | struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata; |
| 542 | struct cpufreq_policy *policy = cpufreq_cdev->policy; | 542 | struct cpufreq_policy *policy = cpufreq_cdev->policy; |
| 543 | 543 | ||
| 544 | cur_freq = cpufreq_quick_get(policy->cpu); | ||
| 545 | power = power > 0 ? power : 0; | 544 | power = power > 0 ? power : 0; |
| 546 | last_load = cpufreq_cdev->last_load ?: 1; | 545 | last_load = cpufreq_cdev->last_load ?: 1; |
| 547 | normalised_power = (power * 100) / last_load; | 546 | normalised_power = (power * 100) / last_load; |
