Skip to content

Commit 637f86d

Browse files
Matthew Garrettgregkh
authored andcommitted
thermal/int340x_thermal: fix mode setting
[ Upstream commit 396ee4d ] int3400 only pushes the UUID into the firmware when the mode is flipped to "enable". The current code only exposes the mode flag if the firmware supports the PASSIVE_1 UUID, which not all machines do. Remove the restriction. Signed-off-by: Matthew Garrett <[email protected]> Signed-off-by: Zhang Rui <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f37079c commit 637f86d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/thermal/int340x_thermal/int3400_thermal.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)
316316

317317
platform_set_drvdata(pdev, priv);
318318

319-
if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) {
320-
int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
321-
int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
322-
}
319+
int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
320+
int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
321+
323322
priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
324323
priv, &int3400_thermal_ops,
325324
&int3400_thermal_params, 0, 0);

0 commit comments

Comments
 (0)