summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/gov_fair_share.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/gov_fair_share.c')
-rw-r--r--drivers/thermal/gov_fair_share.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/thermal/gov_fair_share.c b/drivers/thermal/gov_fair_share.c
index a4ee4661e9cc..1cfeac16e7ac 100644
--- a/drivers/thermal/gov_fair_share.c
+++ b/drivers/thermal/gov_fair_share.c
@@ -49,11 +49,7 @@ static int get_trip_level(struct thermal_zone_device *tz)
static long get_target_state(struct thermal_zone_device *tz,
struct thermal_cooling_device *cdev, int percentage, int level)
{
- unsigned long max_state;
-
- cdev->ops->get_max_state(cdev, &max_state);
-
- return (long)(percentage * level * max_state) / (100 * tz->num_trips);
+ return (long)(percentage * level * cdev->max_state) / (100 * tz->num_trips);
}
/**