diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-30 14:13:50 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-30 14:13:50 +0200 |
commit | da48afb26b40ebb5d6b0e84793e0662859c7ea20 (patch) | |
tree | 1c85a4ebd412a8c5e05e6dcb6a64f1326f8f1dff /drivers/acpi/thermal.c | |
parent | 7a330a5416de9240c93a6987e11cb32b581d3263 (diff) | |
parent | 524f42fab787a9510be826ce3d736b56d454ac6d (diff) | |
download | linux-da48afb26b40ebb5d6b0e84793e0662859c7ea20.tar.gz linux-da48afb26b40ebb5d6b0e84793e0662859c7ea20.tar.xz |
Merge branch 'acpi-assorted'
* acpi-assorted:
ACPI / EC: Add ASUSTEK L4R to quirk list in order to validate ECDT
ACPI / thermal: Add check of "_TZD" availability and evaluating result
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 9063239e0b13..6a0329340b42 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -475,14 +475,14 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) break; } - if (flag & ACPI_TRIPS_DEVICES) { - memset(&devices, 0, sizeof(struct acpi_handle_list)); + if ((flag & ACPI_TRIPS_DEVICES) + && acpi_has_method(tz->device->handle, "_TZD")) { + memset(&devices, 0, sizeof(devices)); status = acpi_evaluate_reference(tz->device->handle, "_TZD", NULL, &devices); - if (memcmp(&tz->devices, &devices, - sizeof(struct acpi_handle_list))) { - memcpy(&tz->devices, &devices, - sizeof(struct acpi_handle_list)); + if (ACPI_SUCCESS(status) + && memcmp(&tz->devices, &devices, sizeof(devices))) { + tz->devices = devices; ACPI_THERMAL_TRIPS_EXCEPTION(flag, "device"); } } |