]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.170/thermal-int340x_thermal-fix-mode-setting.patch
Linux 4.9.170
[thirdparty/kernel/stable-queue.git] / releases / 4.9.170 / thermal-int340x_thermal-fix-mode-setting.patch
CommitLineData
5ddacef6
SLM
1From bb95f8fd7e7ecf67845319e0cb20d96d3fe61631 Mon Sep 17 00:00:00 2001
2From: Matthew Garrett <matthewgarrett@google.com>
3Date: Wed, 10 Oct 2018 01:30:07 -0700
4Subject: thermal/int340x_thermal: fix mode setting
5
6[ Upstream commit 396ee4d0cd52c13b3f6421b8d324d65da5e7e409 ]
7
8int3400 only pushes the UUID into the firmware when the mode is flipped
9to "enable". The current code only exposes the mode flag if the firmware
10supports the PASSIVE_1 UUID, which not all machines do. Remove the
11restriction.
12
13Signed-off-by: Matthew Garrett <mjg59@google.com>
14Signed-off-by: Zhang Rui <rui.zhang@intel.com>
15Signed-off-by: Sasha Levin <sashal@kernel.org>
16---
17 drivers/thermal/int340x_thermal/int3400_thermal.c | 7 +++----
18 1 file changed, 3 insertions(+), 4 deletions(-)
19
20diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c
21index 0beed2899163..d4c374cc4f74 100644
22--- a/drivers/thermal/int340x_thermal/int3400_thermal.c
23+++ b/drivers/thermal/int340x_thermal/int3400_thermal.c
24@@ -285,10 +285,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)
25
26 platform_set_drvdata(pdev, priv);
27
28- if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) {
29- int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
30- int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
31- }
32+ int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
33+ int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
34+
35 priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
36 priv, &int3400_thermal_ops,
37 &int3400_thermal_params, 0, 0);
38--
392.19.1
40