Skip to content

Commit

Permalink
thermal: trip: Constify thermal zone argument of thermal_zone_trip_id()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Jan 4, 2024
1 parent d654362 commit f380846
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/thermal/thermal_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/thermal/thermal_trip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
/*
Expand Down

0 comments on commit f380846

Please sign in to comment.