]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal: core: Drop the .set_trip_hyst() thermal zone operation
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Feb 2024 17:32:03 +0000 (18:32 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Feb 2024 11:04:01 +0000 (12:04 +0100)
None of the users of the thermal core provides a .set_trip_hyst()
thermal zone operation, so drop that callback from struct
thermal_zone_device_ops and update trip_point_hyst_store()
accordingly.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/thermal_sysfs.c
include/linux/thermal.h

index 39dbbdac75d0892e9df5f6b756f0139f69f3bd89..7c02d35384cebcfd32ea4ab17f8123ebe91d8823 100644 (file)
@@ -174,18 +174,11 @@ trip_point_hyst_store(struct device *dev, struct device_attribute *attr,
        trip = &tz->trips[trip_id];
 
        if (hyst != trip->hysteresis) {
-               if (tz->ops.set_trip_hyst) {
-                       ret = tz->ops.set_trip_hyst(tz, trip_id, hyst);
-                       if (ret)
-                               goto unlock;
-               }
-
                trip->hysteresis = hyst;
 
                thermal_zone_trip_updated(tz, trip);
        }
 
-unlock:
        mutex_unlock(&tz->lock);
 
        return ret ? ret : count;
index 6eb6f3297ea00f12ae1bb1bba9b31009e8ec213a..eb4145a64c7e0e603284c13ce42c0af87b248b52 100644 (file)
@@ -91,7 +91,6 @@ struct thermal_zone_device_ops {
        int (*change_mode) (struct thermal_zone_device *,
                enum thermal_device_mode);
        int (*set_trip_temp) (struct thermal_zone_device *, int, int);
-       int (*set_trip_hyst) (struct thermal_zone_device *, int, int);
        int (*get_crit_temp) (struct thermal_zone_device *, int *);
        int (*set_emul_temp) (struct thermal_zone_device *, int);
        int (*get_trend) (struct thermal_zone_device *,