diff options
author | Andrzej Pietrasiewicz | 2020-06-29 14:29:22 +0200 |
---|---|---|
committer | Daniel Lezcano | 2020-06-29 20:26:37 +0200 |
commit | bbcf90c0646ac797700269fa6645a6a46466c79f (patch) | |
tree | d207eaf7f8565905fa7417fd49a1eebac8da61a8 /drivers/platform | |
parent | 7f4957be0d5b83c8964491863202136c916107ae (diff) |
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/platform')
-rw-r--r-- | drivers/platform/x86/intel_mid_thermal.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c index f402e2e74a38..f12f4e7bd971 100644 --- a/drivers/platform/x86/intel_mid_thermal.c +++ b/drivers/platform/x86/intel_mid_thermal.c @@ -493,6 +493,12 @@ static int mid_thermal_probe(struct platform_device *pdev) ret = PTR_ERR(pinfo->tzd[i]); goto err; } + ret = thermal_zone_device_enable(pinfo->tzd[i]); + if (ret) { + kfree(td_info); + thermal_zone_device_unregister(pinfo->tzd[i]); + goto err; + } } pinfo->pdev = pdev; |