From: Rafael J. Wysocki Date: Mon, 29 Jul 2024 16:12:45 +0000 (+0200) Subject: thermal: trip: Drop thermal_zone_get_trip() X-Git-Tag: v6.12-rc1~216^2~2^2~20^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ecd953ca5850d2f83f548d4bbcf672d2d2cd0ca;p=thirdparty%2Fkernel%2Flinux.git thermal: trip: Drop thermal_zone_get_trip() 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 Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/2220301.Mh6RI2rZIc@rjwysocki.net --- diff --git a/drivers/thermal/thermal_trip.c b/drivers/thermal/thermal_trip.c index e64d045d1603e..079e5e452eeba 100644 --- a/drivers/thermal/thermal_trip.c +++ b/drivers/thermal/thermal_trip.c @@ -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) { diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 4fdfd5abd2c41..db44a57a74745 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -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);