1 From ba620e09be367808baa56a1f0828294f17edc76c 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
6 [ Upstream commit 396ee4d0cd52c13b3f6421b8d324d65da5e7e409 ]
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
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>
17 drivers/thermal/int340x_thermal/int3400_thermal.c | 7 +++----
18 1 file changed, 3 insertions(+), 4 deletions(-)
20 diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c
21 index 34dc4d6dda66..4a20f4d47b1d 100644
22 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c
23 +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c
24 @@ -316,10 +316,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)
26 platform_set_drvdata(pdev, priv);
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;
32 + int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
33 + int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
35 priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
36 priv, &int3400_thermal_ops,
37 &int3400_thermal_params, 0, 0);