aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/thermal.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 9073ada88835..77b8e1eaa717 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -368,7 +368,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
368 int valid = 0; 368 int valid = 0;
369 int i; 369 int i;
370 370
371 /* Critical Shutdown (required) */ 371 /* Critical Shutdown */
372 if (flag & ACPI_TRIPS_CRITICAL) { 372 if (flag & ACPI_TRIPS_CRITICAL) {
373 status = acpi_evaluate_integer(tz->device->handle, 373 status = acpi_evaluate_integer(tz->device->handle,
374 "_CRT", NULL, &tmp); 374 "_CRT", NULL, &tmp);
@@ -379,17 +379,19 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
379 * Below zero (Celsius) values clearly aren't right for sure.. 379 * Below zero (Celsius) values clearly aren't right for sure..
380 * ... so lets discard those as invalid. 380 * ... so lets discard those as invalid.
381 */ 381 */
382 if (ACPI_FAILURE(status) || 382 if (ACPI_FAILURE(status)) {
383 tz->trips.critical.temperature <= 2732) { 383 tz->trips.critical.flags.valid = 0;
384 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
385 "No critical threshold\n"));
386 } else if (tmp <= 2732) {
387 printk(KERN_WARNING FW_BUG "Invalid critical threshold "
388 "(%llu)\n", tmp);
384 tz->trips.critical.flags.valid = 0; 389 tz->trips.critical.flags.valid = 0;
385 ACPI_EXCEPTION((AE_INFO, status,
386 "No or invalid critical threshold"));
387 return -ENODEV;
388 } else { 390 } else {
389 tz->trips.critical.flags.valid = 1; 391 tz->trips.critical.flags.valid = 1;
390 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 392 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
391 "Found critical threshold [%lu]\n", 393 "Found critical threshold [%lu]\n",
392 tz->trips.critical.temperature)); 394 tz->trips.critical.temperature));
393 } 395 }
394 if (tz->trips.critical.flags.valid == 1) { 396 if (tz->trips.critical.flags.valid == 1) {
395 if (crt == -1) { 397 if (crt == -1) {