Skip to content

Commit b0b5d06

Browse files
jhovoldDaniel Lezcano
authored andcommitted
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: 56d7b39 ("thermal/drivers/tegra: Use generic thermal_zone_get_trip() function") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20221214131617.2447-4-johan+linaro@kernel.org Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
1 parent e6ec64f commit b0b5d06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/thermal/tegra/soctherm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ static int tegra_thermctl_set_trip_temp(struct thermal_zone_device *tz, int trip
594594
if (!tz)
595595
return -EINVAL;
596596

597-
ret = thermal_zone_get_trip(tz, trip_id, &trip);
597+
ret = __thermal_zone_get_trip(tz, trip_id, &trip);
598598
if (ret)
599599
return ret;
600600

0 commit comments

Comments
 (0)