thermal: qcom: Use thermal_zone_get_crit_temp() in qpnp_tm_init()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Jul 2024 15:58:56 +0000 (17:58 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Aug 2024 11:46:10 +0000 (13:46 +0200)
commitab446887ea7753e712cd3b6f54e5786bbb7b1e33
treeea6a7cefdbdcd5bc0f988aeadba6693e3a86e40d
parent1ac1503cffd84aa7a6e699426de3e6308c9c34b6
thermal: qcom: Use thermal_zone_get_crit_temp() in qpnp_tm_init()

Modify qpnp_tm_init() to use thermal_zone_get_crit_temp() to get the
critical trip temperature instead of iterating over trip indices and
using thermal_zone_get_trip() to get a struct thermal_trip pointer
from a trip index until it finds the critical one.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/7712228.EvYhyI6sBW@rjwysocki.net
drivers/thermal/qcom/qcom-spmi-temp-alarm.c