]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal: trip: Drop thermal_zone_get_trip()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Jul 2024 16:12:45 +0000 (18:12 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Aug 2024 12:01:12 +0000 (14:01 +0200)
There are no more callers of thermal_zone_get_trip() in the tree, so
drop it.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/2220301.Mh6RI2rZIc@rjwysocki.net
drivers/thermal/thermal_trip.c
include/linux/thermal.h

index e64d045d1603e77ad52dd1e75a6e75146b00ef95..079e5e452eeba103dc5d36796e2ba10661d9b8c9 100644 (file)
@@ -108,20 +108,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz)
                dev_err(&tz->device, "Failed to set trips: %d\n", ret);
 }
 
-int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
-                         struct thermal_trip *trip)
-{
-       if (!tz || !trip || trip_id < 0 || trip_id >= tz->num_trips)
-               return -EINVAL;
-
-       mutex_lock(&tz->lock);
-       *trip = tz->trips[trip_id].trip;
-       mutex_unlock(&tz->lock);
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(thermal_zone_get_trip);
-
 int thermal_zone_trip_id(const struct thermal_zone_device *tz,
                         const struct thermal_trip *trip)
 {
index 4fdfd5abd2c41f72a7e15c894eb0e19c90159eab..db44a57a7474558fa4b2abaaf2b0b259a5cd036b 100644 (file)
@@ -202,8 +202,6 @@ static inline void devm_thermal_of_zone_unregister(struct device *dev,
 }
 #endif
 
-int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
-                         struct thermal_trip *trip);
 int for_each_thermal_trip(struct thermal_zone_device *tz,
                          int (*cb)(struct thermal_trip *, void *),
                          void *data);