thermal: trip: Define for_each_trip() macro
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 12 Oct 2023 18:26:46 +0000 (20:26 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 20 Oct 2023 17:26:01 +0000 (19:26 +0200)
commit234ed6f5fbedf7bc84f9adc08c3e11ca8588ffd8
tree3f9f0553ca9580c01d07b8b216e51f65f7cae7f1
parent78869767f2ad3a98d2c830b718a503d8b0a94b26
thermal: trip: Define for_each_trip() macro

Define a new macro for_each_trip() to be used by the thermal core code
and thermal governors for walking trips in a given thermal zone.

Modify for_each_thermal_trip() to use this macro instead of an open-
coded loop over trips.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/thermal_core.h
drivers/thermal/thermal_trip.c