]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal: core: Move threshold out of struct thermal_trip
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 2 Apr 2024 18:56:43 +0000 (20:56 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Apr 2024 14:01:20 +0000 (16:01 +0200)
commitdaeeb032f42d066a49e07b7f6effc9f51b7a5479
tree241a3bcb198f013c132e3c4b94557888e47c1a88
parent053b852c46626250b5f7da43ba8574da756db022
thermal: core: Move threshold out of struct thermal_trip

The threshold field in struct thermal_trip is only used internally by
the thermal core and it is better to prevent drivers from misusing it.
It also takes some space unnecessarily in the trip tables passed by
drivers to the core during thermal zone registration.

For this reason, introduce struct thermal_trip_desc as a wrapper around
struct thermal_trip, move the threshold field directly into it and make
the thermal core store struct thermal_trip_desc objects in the internal
thermal zone trip tables.  Adjust all of the code using trip tables in
the thermal core accordingly.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/gov_fair_share.c
drivers/thermal/gov_power_allocator.c
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h
drivers/thermal/thermal_debugfs.c
drivers/thermal/thermal_helpers.c
drivers/thermal/thermal_netlink.c
drivers/thermal/thermal_sysfs.c
drivers/thermal/thermal_trip.c
include/linux/thermal.h