ACPI: thermal: Do not use trip indices for cooling device binding
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 21 Sep 2023 18:02:59 +0000 (20:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 28 Sep 2023 17:27:19 +0000 (19:27 +0200)
commitd5ea889246b112e228433a5f27f57af90ca0c1fb
treeddab91cecc9b12a1113760482f94cc1275c2fade
parent377020153617db399334531114fe86a3552e801d
ACPI: thermal: Do not use trip indices for cooling device binding

Rearrange the ACPI thermal driver's callback functions used for cooling
device binding and unbinding, acpi_thermal_bind_cooling_device() and
acpi_thermal_unbind_cooling_device(), respectively, so that they use trip
pointers instead of trip indices which is more straightforward and allows
the driver to become independent of the ordering of trips in the thermal
zone structure.

The general functionality is not expected to be changed.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/acpi/thermal.c