thermal/drivers/qcom: Fix set_trip_temp() deadlock

The set_trip_temp() callback is used when changing the trip temperature
through sysfs. As it is called with the thermal-zone-device lock held
it must not use thermal_zone_get_trip() directly or it will deadlock.

Fixes: 78c3e2429be8 ("thermal/drivers/qcom: Use generic thermal_zone_get_trip() function")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20221214131617.2447-2-johan+linaro@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
This commit is contained in:
Johan Hovold
2022-12-14 14:16:14 +01:00
committed by Daniel Lezcano
parent 44a29a4dab
commit e6ec64f852
3 changed files with 4 additions and 1 deletions

View File

@@ -334,6 +334,8 @@ static inline void devm_thermal_of_zone_unregister(struct device *dev,
}
#endif
int __thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
struct thermal_trip *trip);
int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
struct thermal_trip *trip);