summaryrefslogtreecommitdiff
path: root/drivers/thermal/st
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>2020-06-29 15:29:22 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-06-29 21:26:37 +0300
commitbbcf90c0646ac797700269fa6645a6a46466c79f (patch)
treed207eaf7f8565905fa7417fd49a1eebac8da61a8 /drivers/thermal/st
parent7f4957be0d5b83c8964491863202136c916107ae (diff)
downloadlinux-bbcf90c0646ac797700269fa6645a6a46466c79f.tar.xz
thermal: Explicitly enable non-changing thermal zone devices
Some thermal zone devices never change their state, so they should be always enabled. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200629122925.21729-9-andrzej.p@collabora.com
Diffstat (limited to 'drivers/thermal/st')
-rw-r--r--drivers/thermal/st/st_thermal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c
index b928ca6a289b..1276b95604fe 100644
--- a/drivers/thermal/st/st_thermal.c
+++ b/drivers/thermal/st/st_thermal.c
@@ -246,11 +246,16 @@ int st_thermal_register(struct platform_device *pdev,
ret = PTR_ERR(sensor->thermal_dev);
goto sensor_off;
}
+ ret = thermal_zone_device_enable(sensor->thermal_dev);
+ if (ret)
+ goto tzd_unregister;
platform_set_drvdata(pdev, sensor);
return 0;
+tzd_unregister:
+ thermal_zone_device_unregister(sensor->thermal_dev);
sensor_off:
st_thermal_sensor_off(sensor);