summaryrefslogtreecommitdiff
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-16 12:40:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-16 12:40:37 -0800
commit71556b9800fff8bf59075d2c1622acc9d99113ef (patch)
tree9e2b6c799cf0cb023a20622bd1338b7ce624c26d /drivers/acpi/thermal.c
parentabcea859783f63c9140ebd9fcb69580d0832f2c8 (diff)
parentd45e0855488032ea62ec5638fb1dcd47367f8ddb (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (23 commits) ACPI PCI hotplug: harden against panic regression ACPI: rename main.c to sleep.c dell-laptop: move to drivers/platform/x86/ from drivers/misc/ eeepc-laptop: enable Bluetooth ACPI details ACPI: fix ACPI_FADT_S4_RTC_WAKE comment kprobes: check CONFIG_FREEZER instead of CONFIG_PM PM: Fix freezer compilation if PM_SLEEP is unset thermal fixup for broken BIOS which has invalid trip points. ACPI: EC: Don't trust ECDT tables from ASUS ACPI: EC: Limit workaround for ASUS notebooks even more ACPI: thinkpad-acpi: bump up version to 0.22 ACPI: thinkpad-acpi: handle HKEY event 6030 ACPI: thinkpad-acpi: clean-up fan subdriver quirk ACPI: thinkpad-acpi: start the event hunt season ACPI: thinkpad-acpi: handle HKEY thermal and battery alarms ACPI: thinkpad-acpi: clean up hotkey_notify() ACPI: thinkpad-acpi: use killable instead of interruptible mutexes ACPI: thinkpad-acpi: add UWB radio support ACPI: thinkpad-acpi: preserve radio state across shutdown ACPI: thinkpad-acpi: resume with radios disabled ...
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r--drivers/acpi/thermal.c16
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)
}
/* Passive (optional) */
- if (flag & ACPI_TRIPS_PASSIVE) {
+ if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.flags.valid) ||
+ (flag == ACPI_TRIPS_INIT)) {
valid = tz->trips.passive.flags.valid;
if (psv == -1) {
status = AE_SUPPORT;
@@ -462,8 +463,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
memset(&devices, 0, sizeof(struct acpi_handle_list));
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
NULL, &devices);
- if (ACPI_FAILURE(status))
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_WARNING PREFIX
+ "Invalid passive threshold\n");
tz->trips.passive.flags.valid = 0;
+ }
else
tz->trips.passive.flags.valid = 1;
@@ -487,7 +491,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
if (act == -1)
break; /* disable all active trip points */
- if (flag & ACPI_TRIPS_ACTIVE) {
+ if ((flag == ACPI_TRIPS_INIT) || ((flag & ACPI_TRIPS_ACTIVE) &&
+ tz->trips.active[i].flags.valid)) {
status = acpi_evaluate_integer(tz->device->handle,
name, NULL, &tmp);
if (ACPI_FAILURE(status)) {
@@ -521,8 +526,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
memset(&devices, 0, sizeof(struct acpi_handle_list));
status = acpi_evaluate_reference(tz->device->handle,
name, NULL, &devices);
- if (ACPI_FAILURE(status))
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_WARNING PREFIX
+ "Invalid active%d threshold\n", i);
tz->trips.active[i].flags.valid = 0;
+ }
else
tz->trips.active[i].flags.valid = 1;