diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2022-12-14 14:16:14 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@kernel.org> | 2023-01-06 14:14:48 +0100 |
commit | e6ec64f85237b48c071158617cfc954a30285fc7 (patch) | |
tree | 3ba1a586422984e3cc308b2b9860fd32d6051c17 /drivers/thermal/qcom | |
parent | thermal/drivers/mellanox: Use generic thermal_zone_get_trip() function (diff) | |
download | linux-e6ec64f85237b48c071158617cfc954a30285fc7.tar.xz linux-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 'drivers/thermal/qcom')
-rw-r--r-- | drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c index 58055a7abaf6..bfaec74f13b2 100644 --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c @@ -270,7 +270,7 @@ static int qpnp_tm_set_trip_temp(struct thermal_zone_device *tz, int trip_id, in struct thermal_trip trip; int ret; - ret = thermal_zone_get_trip(chip->tz_dev, trip_id, &trip); + ret = __thermal_zone_get_trip(chip->tz_dev, trip_id, &trip); if (ret) return ret; |