summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/intel/intel_pch_thermal.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>2020-06-29 14:29:22 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-06-29 20:26:37 +0200
commitbbcf90c0646ac797700269fa6645a6a46466c79f (patch)
treed207eaf7f8565905fa7417fd49a1eebac8da61a8 /drivers/thermal/intel/intel_pch_thermal.c
parentthermal: Use mode helpers in drivers (diff)
downloadlinux-bbcf90c0646ac797700269fa6645a6a46466c79f.tar.xz
linux-bbcf90c0646ac797700269fa6645a6a46466c79f.zip
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/intel/intel_pch_thermal.c')
-rw-r--r--drivers/thermal/intel/intel_pch_thermal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index 56401fd4708d..65702094f3d3 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -352,9 +352,14 @@ static int intel_pch_thermal_probe(struct pci_dev *pdev,
err = PTR_ERR(ptd->tzd);
goto error_cleanup;
}
+ err = thermal_zone_device_enable(ptd->tzd);
+ if (err)
+ goto err_unregister;
return 0;
+err_unregister:
+ thermal_zone_device_unregister(ptd->tzd);
error_cleanup:
iounmap(ptd->hw_base);
error_release: