]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal: core: Eliminate thermal_zone_trip_down()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 16 Oct 2024 11:33:43 +0000 (13:33 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 24 Oct 2024 15:15:07 +0000 (17:15 +0200)
Since thermal_zone_set_trip_temp() is now located in the same file
as thermal_trip_crossed(), it can invoke the latter directly without
using the thermal_zone_trip_down() wrapper that has no other users.

Update thermal_zone_set_trip_temp() accordingly and drop
thermal_zone_trip_down().

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/1807510.VLH7GnMWUR@rjwysocki.net
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h

index 19c5eced452fb199a638ed441d97d6a483002c35..80e2974946dbb5404921dfee4ab619acb6ec66a9 100644 (file)
@@ -565,7 +565,7 @@ void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
                 * are needed to compensate for the lack of it going forward.
                 */
                if (tz->temperature >= td->threshold)
-                       thermal_zone_trip_down(tz, td);
+                       thermal_trip_crossed(tz, td, thermal_get_tz_governor(tz), false);
 
                /*
                 * Invalidate the threshold to avoid triggering a spurious
@@ -699,12 +699,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
 }
 EXPORT_SYMBOL_GPL(thermal_zone_device_update);
 
-void thermal_zone_trip_down(struct thermal_zone_device *tz,
-                           struct thermal_trip_desc *td)
-{
-       thermal_trip_crossed(tz, td, thermal_get_tz_governor(tz), false);
-}
-
 int for_each_thermal_governor(int (*cb)(struct thermal_governor *, void *),
                              void *data)
 {
index e1463ee1f7dcdb144023df31a593d6505aba6010..c4759f7222f6c6a118cda715d56e45f3edb300f6 100644 (file)
@@ -273,8 +273,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz, int low, int high);
 int thermal_zone_trip_id(const struct thermal_zone_device *tz,
                         const struct thermal_trip *trip);
 int __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
-void thermal_zone_trip_down(struct thermal_zone_device *tz,
-                           struct thermal_trip_desc *td);
 void thermal_zone_set_trip_hyst(struct thermal_zone_device *tz,
                                struct thermal_trip *trip, int hyst);