Skip to content

Commit f380846

Browse files
committed
thermal: trip: Constify thermal zone argument of thermal_zone_trip_id()
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>
1 parent d654362 commit f380846

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/thermal/thermal_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void thermal_governor_update_tz(struct thermal_zone_device *tz,
123123
for (__trip = __tz->trips; __trip - __tz->trips < __tz->num_trips; __trip++)
124124

125125
void __thermal_zone_set_trips(struct thermal_zone_device *tz);
126-
int thermal_zone_trip_id(struct thermal_zone_device *tz,
126+
int thermal_zone_trip_id(const struct thermal_zone_device *tz,
127127
const struct thermal_trip *trip);
128128
void thermal_zone_trip_updated(struct thermal_zone_device *tz,
129129
const struct thermal_trip *trip);

drivers/thermal/thermal_trip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
143143
}
144144
EXPORT_SYMBOL_GPL(thermal_zone_get_trip);
145145

146-
int thermal_zone_trip_id(struct thermal_zone_device *tz,
146+
int thermal_zone_trip_id(const struct thermal_zone_device *tz,
147147
const struct thermal_trip *trip)
148148
{
149149
/*

0 commit comments

Comments
 (0)