diff options
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 073ff09218a9..99e6f1f8ea45 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -416,7 +416,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
416 | } | 416 | } |
417 | 417 | ||
418 | /* Passive (optional) */ | 418 | /* Passive (optional) */ |
419 | if (flag & ACPI_TRIPS_PASSIVE) { | 419 | if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.flags.valid) || |
420 | (flag == ACPI_TRIPS_INIT)) { | ||
420 | valid = tz->trips.passive.flags.valid; | 421 | valid = tz->trips.passive.flags.valid; |
421 | if (psv == -1) { | 422 | if (psv == -1) { |
422 | status = AE_SUPPORT; | 423 | status = AE_SUPPORT; |
@@ -462,8 +463,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
462 | memset(&devices, 0, sizeof(struct acpi_handle_list)); | 463 | memset(&devices, 0, sizeof(struct acpi_handle_list)); |
463 | status = acpi_evaluate_reference(tz->device->handle, "_PSL", | 464 | status = acpi_evaluate_reference(tz->device->handle, "_PSL", |
464 | NULL, &devices); | 465 | NULL, &devices); |
465 | if (ACPI_FAILURE(status)) | 466 | if (ACPI_FAILURE(status)) { |
467 | printk(KERN_WARNING PREFIX | ||
468 | "Invalid passive threshold\n"); | ||
466 | tz->trips.passive.flags.valid = 0; | 469 | tz->trips.passive.flags.valid = 0; |
470 | } | ||
467 | else | 471 | else |
468 | tz->trips.passive.flags.valid = 1; | 472 | tz->trips.passive.flags.valid = 1; |
469 | 473 | ||
@@ -487,7 +491,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
487 | if (act == -1) | 491 | if (act == -1) |
488 | break; /* disable all active trip points */ | 492 | break; /* disable all active trip points */ |
489 | 493 | ||
490 | if (flag & ACPI_TRIPS_ACTIVE) { | 494 | if ((flag == ACPI_TRIPS_INIT) || ((flag & ACPI_TRIPS_ACTIVE) && |
495 | tz->trips.active[i].flags.valid)) { | ||
491 | status = acpi_evaluate_integer(tz->device->handle, | 496 | status = acpi_evaluate_integer(tz->device->handle, |
492 | name, NULL, &tmp); | 497 | name, NULL, &tmp); |
493 | if (ACPI_FAILURE(status)) { | 498 | if (ACPI_FAILURE(status)) { |
@@ -521,8 +526,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
521 | memset(&devices, 0, sizeof(struct acpi_handle_list)); | 526 | memset(&devices, 0, sizeof(struct acpi_handle_list)); |
522 | status = acpi_evaluate_reference(tz->device->handle, | 527 | status = acpi_evaluate_reference(tz->device->handle, |
523 | name, NULL, &devices); | 528 | name, NULL, &devices); |
524 | if (ACPI_FAILURE(status)) | 529 | if (ACPI_FAILURE(status)) { |
530 | printk(KERN_WARNING PREFIX | ||
531 | "Invalid active%d threshold\n", i); | ||
525 | tz->trips.active[i].flags.valid = 0; | 532 | tz->trips.active[i].flags.valid = 0; |
533 | } | ||
526 | else | 534 | else |
527 | tz->trips.active[i].flags.valid = 1; | 535 | tz->trips.active[i].flags.valid = 1; |
528 | 536 | ||