diff options
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 73b6fe7093e9..1ada017d01ef 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -59,8 +59,6 @@ | |||
59 | #define ACPI_THERMAL_NOTIFY_CRITICAL 0xF0 | 59 | #define ACPI_THERMAL_NOTIFY_CRITICAL 0xF0 |
60 | #define ACPI_THERMAL_NOTIFY_HOT 0xF1 | 60 | #define ACPI_THERMAL_NOTIFY_HOT 0xF1 |
61 | #define ACPI_THERMAL_MODE_ACTIVE 0x00 | 61 | #define ACPI_THERMAL_MODE_ACTIVE 0x00 |
62 | #define ACPI_THERMAL_MODE_PASSIVE 0x01 | ||
63 | #define ACPI_THERMAL_MODE_CRITICAL 0xff | ||
64 | #define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff" | 62 | #define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff" |
65 | 63 | ||
66 | #define ACPI_THERMAL_MAX_ACTIVE 10 | 64 | #define ACPI_THERMAL_MAX_ACTIVE 10 |
@@ -164,7 +162,6 @@ struct acpi_thermal { | |||
164 | unsigned long temperature; | 162 | unsigned long temperature; |
165 | unsigned long last_temperature; | 163 | unsigned long last_temperature; |
166 | unsigned long polling_frequency; | 164 | unsigned long polling_frequency; |
167 | u8 cooling_mode; | ||
168 | volatile u8 zombie; | 165 | volatile u8 zombie; |
169 | struct acpi_thermal_flags flags; | 166 | struct acpi_thermal_flags flags; |
170 | struct acpi_thermal_state state; | 167 | struct acpi_thermal_state state; |
@@ -293,11 +290,6 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) | |||
293 | if (ACPI_FAILURE(status)) | 290 | if (ACPI_FAILURE(status)) |
294 | return -ENODEV; | 291 | return -ENODEV; |
295 | 292 | ||
296 | tz->cooling_mode = mode; | ||
297 | |||
298 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling mode [%s]\n", | ||
299 | mode ? "passive" : "active")); | ||
300 | |||
301 | return 0; | 293 | return 0; |
302 | } | 294 | } |
303 | 295 | ||
@@ -893,15 +885,10 @@ static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset) | |||
893 | if (!tz) | 885 | if (!tz) |
894 | goto end; | 886 | goto end; |
895 | 887 | ||
896 | if (!tz->flags.cooling_mode) { | 888 | if (!tz->flags.cooling_mode) |
897 | seq_puts(seq, "<setting not supported>\n"); | 889 | seq_puts(seq, "<setting not supported>\n"); |
898 | } | ||
899 | |||
900 | if (tz->cooling_mode == ACPI_THERMAL_MODE_CRITICAL) | ||
901 | seq_printf(seq, "cooling mode: critical\n"); | ||
902 | else | 890 | else |
903 | seq_printf(seq, "cooling mode: %s\n", | 891 | seq_puts(seq, "0 - Active; 1 - Passive\n"); |
904 | tz->cooling_mode ? "passive" : "active"); | ||
905 | 892 | ||
906 | end: | 893 | end: |
907 | return 0; | 894 | return 0; |
@@ -1158,28 +1145,6 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz) | |||
1158 | result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE); | 1145 | result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE); |
1159 | if (!result) | 1146 | if (!result) |
1160 | tz->flags.cooling_mode = 1; | 1147 | tz->flags.cooling_mode = 1; |
1161 | else { | ||
1162 | /* Oh,we have not _SCP method. | ||
1163 | Generally show cooling_mode by _ACx, _PSV,spec 12.2 */ | ||
1164 | tz->flags.cooling_mode = 0; | ||
1165 | if (tz->trips.active[0].flags.valid | ||
1166 | && tz->trips.passive.flags.valid) { | ||
1167 | if (tz->trips.passive.temperature > | ||
1168 | tz->trips.active[0].temperature) | ||
1169 | tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE; | ||
1170 | else | ||
1171 | tz->cooling_mode = ACPI_THERMAL_MODE_PASSIVE; | ||
1172 | } else if (!tz->trips.active[0].flags.valid | ||
1173 | && tz->trips.passive.flags.valid) { | ||
1174 | tz->cooling_mode = ACPI_THERMAL_MODE_PASSIVE; | ||
1175 | } else if (tz->trips.active[0].flags.valid | ||
1176 | && !tz->trips.passive.flags.valid) { | ||
1177 | tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE; | ||
1178 | } else { | ||
1179 | /* _ACx and _PSV are optional, but _CRT is required */ | ||
1180 | tz->cooling_mode = ACPI_THERMAL_MODE_CRITICAL; | ||
1181 | } | ||
1182 | } | ||
1183 | 1148 | ||
1184 | /* Get default polling frequency [_TZP] (optional) */ | 1149 | /* Get default polling frequency [_TZP] (optional) */ |
1185 | if (tzp) | 1150 | if (tzp) |