]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 17 Jun 2024 18:07:35 +0000 (20:07 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Jul 2024 11:25:31 +0000 (13:25 +0200)
commit6fb75c967162c28b2a50cb4673cce36e0e70e3dc
tree1012bcce0cfa2e5eaf4718cfab695512f3337581
parentefde8bfdc1c76b4eefc5de0eb4c14738580d97d6
thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points

It is generally inefficient to iterate over trip indices and call
thermal_zone_get_trip() every time to get the struct thermal_trip
corresponding to the given trip index, so modify the uniphier thermal
driver to use thermal_zone_for_each_trip() for walking trips.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://patch.msgid.link/2148114.bB369e8A3T@kreacher
[ rjw: Add missing return statement, remove unused local variable ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/uniphier_thermal.c