aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/devfreq_cooling.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/devfreq_cooling.c')
-rw-r--r--drivers/thermal/devfreq_cooling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index 262e62ab6cf2..90b828bcca24 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -201,7 +201,7 @@ static int devfreq_cooling_get_requested_power(struct thermal_cooling_device *cd
res = dfc->power_ops->get_real_power(df, power, freq, voltage);
if (!res) {
- state = dfc->capped_state;
+ state = dfc->max_state - dfc->capped_state;
/* Convert EM power into milli-Watts first */
dfc->res_util = dfc->em_pd->table[state].power;