aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/dsobject.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 12:32:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 12:32:11 -0400
commitc11f6c82581e8be4e1829c677db54e7f55cebece (patch)
tree1a116241b0831ded998aabe800bdc24104cbd826 /drivers/acpi/acpica/dsobject.c
parent40aba218969914d1b225e742617adb921cf94eae (diff)
parent193a6dec1c0246a80b6d0101e4f351ccf877bcac (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: (119 commits) ACPI: don't pass handle for fixed hardware notifications ACPI: remove null pointer checks in deferred execution path ACPI: simplify deferred execution path acerhdf: additional BIOS versions acerhdf: convert to dev_pm_ops acerhdf: fix fan control for AOA150 model thermal: add missing Kconfig dependency acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file hp-wmi: fix rfkill memory leak on unload ACPI: remove unnecessary #ifdef CONFIG_DMI ACPI: linux/acpi.h should not include linux/dmi.h hwmon driver for ACPI 4.0 power meters topstar-laptop: add new driver for hotkeys support on Topstar N01 thinkpad_acpi: fix rfkill memory leak on unload thinkpad-acpi: report brightness events when required thinkpad-acpi: don't poll by default any of the reserved hotkeys thinkpad-acpi: Fix procfs hotkey reset command thinkpad-acpi: deprecate hotkey_bios_mask thinkpad-acpi: hotkey poll fixes thinkpad-acpi: be more strict when detecting a ThinkPad ...
Diffstat (limited to 'drivers/acpi/acpica/dsobject.c')
-rw-r--r--drivers/acpi/acpica/dsobject.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index 02e6caad4a76..507e1f0bbdfd 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -482,14 +482,27 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
482 if (arg) { 482 if (arg) {
483 /* 483 /*
484 * num_elements was exhausted, but there are remaining elements in the 484 * num_elements was exhausted, but there are remaining elements in the
485 * package_list. 485 * package_list. Truncate the package to num_elements.
486 * 486 *
487 * Note: technically, this is an error, from ACPI spec: "It is an error 487 * Note: technically, this is an error, from ACPI spec: "It is an error
488 * for NumElements to be less than the number of elements in the 488 * for NumElements to be less than the number of elements in the
489 * PackageList". However, for now, we just print an error message and 489 * PackageList". However, we just print an error message and
490 * no exception is returned. 490 * no exception is returned. This provides Windows compatibility. Some
491 * BIOSs will alter the num_elements on the fly, creating this type
492 * of ill-formed package object.
491 */ 493 */
492 while (arg) { 494 while (arg) {
495 /*
496 * We must delete any package elements that were created earlier
497 * and are not going to be used because of the package truncation.
498 */
499 if (arg->common.node) {
500 acpi_ut_remove_reference(ACPI_CAST_PTR
501 (union
502 acpi_operand_object,
503 arg->common.node));
504 arg->common.node = NULL;
505 }
493 506
494 /* Find out how many elements there really are */ 507 /* Find out how many elements there really are */
495 508
@@ -498,7 +511,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
498 } 511 }
499 512
500 ACPI_WARNING((AE_INFO, 513 ACPI_WARNING((AE_INFO,
501 "Package List length (%X) larger than NumElements count (%X), truncated\n", 514 "Package List length (0x%X) larger than NumElements count (0x%X), truncated\n",
502 i, element_count)); 515 i, element_count));
503 } else if (i < element_count) { 516 } else if (i < element_count) {
504 /* 517 /*
@@ -506,7 +519,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
506 * Note: this is not an error, the package is padded out with NULLs. 519 * Note: this is not an error, the package is padded out with NULLs.
507 */ 520 */
508 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 521 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
509 "Package List length (%X) smaller than NumElements count (%X), padded with null elements\n", 522 "Package List length (0x%X) smaller than NumElements count (0x%X), padded with null elements\n",
510 i, element_count)); 523 i, element_count));
511 } 524 }
512 525