Merge tag 'for-linus-6.2-1' of https://github.com/cminyard/linux-ipmi
[linux-2.6-microblaze.git] / drivers / thermal / gov_fair_share.c
index a4ee466..1cfeac1 100644 (file)
@@ -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);
 }
 
 /**