thermal: core: Rework .get_trend() thermal zone callback
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Aug 2023 11:40:06 +0000 (13:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 29 Aug 2023 18:48:35 +0000 (20:48 +0200)
commit8289d810ea85755a9d22f75785806cb34eecd5e5
treea78b7cf7c666339a21d04d99c0c28e2b6c5e016e
parent35d8dbbb25add265a880ab0dc48a229f06b08325
thermal: core: Rework .get_trend() thermal zone callback

Passing a struct thermal_trip pointer instead of a trip index to the
.get_trend() thermal zone callback allows one of its 2 implementations,
the thermal_get_trend() function in the ACPI thermal driver, to be
simplified quite a bit, and the other implementation of it in the
ti-soc-thermal driver does not even use the relevant callback argument.

For this reason, change the .get_trend() thermal zone callback
definition and adjust the related code accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/thermal.c
drivers/thermal/thermal_core.h
drivers/thermal/thermal_helpers.c
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
include/linux/thermal.h