aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/eeepc-laptop.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 1c04c877b824..6c982d6c3a54 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -935,7 +935,10 @@ static int eeepc_get_fan_ctrl(void)
935 int value = 0; 935 int value = 0;
936 936
937 read_acpi_int(NULL, EEEPC_EC_FAN_CTRL, &value); 937 read_acpi_int(NULL, EEEPC_EC_FAN_CTRL, &value);
938 return ((value & 0x02 ? 1 : 0)); 938 if (value & 0x02)
939 return 1; /* manual */
940 else
941 return 2; /* automatic */
939} 942}
940 943
941static void eeepc_set_fan_ctrl(int manual) 944static void eeepc_set_fan_ctrl(int manual)
@@ -943,7 +946,7 @@ static void eeepc_set_fan_ctrl(int manual)
943 int value = 0; 946 int value = 0;
944 947
945 read_acpi_int(NULL, EEEPC_EC_FAN_CTRL, &value); 948 read_acpi_int(NULL, EEEPC_EC_FAN_CTRL, &value);
946 if (manual) 949 if (manual == 1)
947 value |= 0x02; 950 value |= 0x02;
948 else 951 else
949 value &= ~0x02; 952 value &= ~0x02;