From ea7c5ec148044776d5e134e52a3e1aca8d662dbe Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 11 Dec 2009 15:18:52 +0800 Subject: ACPICA: Move Package-to-Buffer repair code into common ToBuffer function Move code specific to _FDE and _GTM into the generic repair code. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- drivers/acpi/acpica/nspredef.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers/acpi/acpica/nspredef.c') diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index 1782c3d85ba..c6297f57fea 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c @@ -215,6 +215,8 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, data->node_flags = node->flags; data->pathname = pathname; + /* TBD: For variable-length Packages, remove NULL elements here */ + /* * Check that the type of the return object is what is expected for * this predefined name @@ -223,10 +225,11 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, predefined->info.expected_btypes, ACPI_NOT_PACKAGE_ELEMENT); if (ACPI_SUCCESS(status)) { - - /* For returned Package objects, check the type of all sub-objects */ - - if (return_object->common.type == ACPI_TYPE_PACKAGE) { + /* + * For returned Package objects, check the type of all sub-objects. + * Note: Package may have been created by call above. + */ + if ((*return_object_ptr)->common.type == ACPI_TYPE_PACKAGE) { status = acpi_ns_check_package(data, return_object_ptr); } } -- cgit v1.2.3-18-g5258