summaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2022-12-14 14:16:14 +0100
committerDaniel Lezcano <daniel.lezcano@kernel.org>2023-01-06 14:14:48 +0100
commite6ec64f85237b48c071158617cfc954a30285fc7 (patch)
tree3ba1a586422984e3cc308b2b9860fd32d6051c17 /include/linux/thermal.h
parent44a29a4dab73411671e0b84817a5f07e291b1501 (diff)
downloadlinux-stable-e6ec64f85237b48c071158617cfc954a30285fc7.tar.gz
linux-stable-e6ec64f85237b48c071158617cfc954a30285fc7.tar.bz2
linux-stable-e6ec64f85237b48c071158617cfc954a30285fc7.zip
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>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index e2797f314d99..30353e4b1424 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -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);