]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.170/thermal-int340x_thermal-fix-mode-setting.patch
remove unneeded perf patch from 4.9
[thirdparty/kernel/stable-queue.git] / releases / 4.9.170 / thermal-int340x_thermal-fix-mode-setting.patch
1 From bb95f8fd7e7ecf67845319e0cb20d96d3fe61631 Mon Sep 17 00:00:00 2001
2 From: Matthew Garrett <matthewgarrett@google.com>
3 Date: Wed, 10 Oct 2018 01:30:07 -0700
4 Subject: thermal/int340x_thermal: fix mode setting
5
6 [ Upstream commit 396ee4d0cd52c13b3f6421b8d324d65da5e7e409 ]
7
8 int3400 only pushes the UUID into the firmware when the mode is flipped
9 to "enable". The current code only exposes the mode flag if the firmware
10 supports the PASSIVE_1 UUID, which not all machines do. Remove the
11 restriction.
12
13 Signed-off-by: Matthew Garrett <mjg59@google.com>
14 Signed-off-by: Zhang Rui <rui.zhang@intel.com>
15 Signed-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
20 diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c
21 index 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 --
39 2.19.1
40