thermal: trip: Constify thermal zone argument of thermal_zone_trip_id()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 Dec 2023 19:53:52 +0000 (20:53 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Jan 2024 11:17:45 +0000 (12:17 +0100)
Because thermal_zone_trip_id() does not update the thermal zone object
passed to it, its pointer argument representing the thermal zone can be
const, so adjust its definition accordingly.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/thermal_core.h
drivers/thermal/thermal_trip.c

index e6a2b6f97be8709e0736113121f539ced5a7e526..4e023d54fd27daaae93f869fefbb656609eef78f 100644 (file)
@@ -123,7 +123,7 @@ void thermal_governor_update_tz(struct thermal_zone_device *tz,
        for (__trip = __tz->trips; __trip - __tz->trips < __tz->num_trips; __trip++)
 
 void __thermal_zone_set_trips(struct thermal_zone_device *tz);
-int thermal_zone_trip_id(struct thermal_zone_device *tz,
+int thermal_zone_trip_id(const struct thermal_zone_device *tz,
                         const struct thermal_trip *trip);
 void thermal_zone_trip_updated(struct thermal_zone_device *tz,
                               const struct thermal_trip *trip);
index a1ad345c07412d2c71a7e417164f3b26b0ad085f..8bffa1e5e2063fe96d2666124f1ebb4a2c2f8c53 100644 (file)
@@ -143,7 +143,7 @@ int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
 }
 EXPORT_SYMBOL_GPL(thermal_zone_get_trip);
 
-int thermal_zone_trip_id(struct thermal_zone_device *tz,
+int thermal_zone_trip_id(const struct thermal_zone_device *tz,
                         const struct thermal_trip *trip)
 {
        /*