Commit b0b5d063 authored by Johan Hovold's avatar Johan Hovold Committed by Daniel Lezcano

thermal/drivers/tegra: 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: 56d7b397cc29 ("thermal/drivers/tegra: Use generic thermal_zone_get_trip() function")
Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20221214131617.2447-4-johan+linaro@kernel.orgSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@kernel.org>
parent e6ec64f8
......@@ -594,7 +594,7 @@ static int tegra_thermctl_set_trip_temp(struct thermal_zone_device *tz, int trip
if (!tz)
return -EINVAL;
ret = thermal_zone_get_trip(tz, trip_id, &trip);
ret = __thermal_zone_get_trip(tz, trip_id, &trip);
if (ret)
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment