]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal: hisi: Use thermal_zone_for_each_trip() in hisi_thermal_register_sensor()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Aug 2024 11:41:02 +0000 (13:41 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Aug 2024 11:41:52 +0000 (13:41 +0200)
commit1ac1503cffd84aa7a6e699426de3e6308c9c34b6
tree9c625f3cdd805be545ce65cee678b4bd7a2adca5
parent5df9809c424fb889eb4ad44f856196d86aa389f7
thermal: hisi: Use thermal_zone_for_each_trip() in hisi_thermal_register_sensor()

Modify hisi_thermal_register_sensor() to use thermal_zone_for_each_trip()
for walking trip points instead of iterating over trip indices and using
thermal_zone_get_trip() to get a struct thermal_trip pointer from a trip
index.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/1994088.PYKUYFuaPT@rjwysocki.net
[ rjw: Dropped two unused local variables ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/hisi_thermal.c