From ed349a8a0a780ed27e2a765f16cee54d9b63bfee Mon Sep 17 00:00:00 2001 From: Len Brown Date: Thu, 5 Jan 2006 02:40:11 -0500 Subject: [ACPI] fix pnpacpi regression resulting from ACPICA 20051117 In ACPICA 20051117, acpi_walk_resources() started sending ACPI_RESOURCE_TYPE_END_TAG to the callback routine which wasn't prepared for it, causing _CRS to fail and PnPACPI to not recognize any devices: pnp: ACPI device : hid PNP0C02 pnp: PnPACPI: unknown resource type 7 pnp: PnPACPI: METHOD_NAME__CRS failure for PNP0c02 Signed-off-by: Len Brown --- drivers/acpi/resources/rsxface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/acpi/resources') diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c index 50a956b705b..5408e5d10cc 100644 --- a/drivers/acpi/resources/rsxface.c +++ b/drivers/acpi/resources/rsxface.c @@ -286,6 +286,12 @@ acpi_walk_resources(acpi_handle device_handle, break; } + /* end_tag indicates end-of-list */ + + if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { + break; + } + /* Invoke the user function, abort on any error returned */ status = user_function(resource, context); @@ -298,12 +304,6 @@ acpi_walk_resources(acpi_handle device_handle, break; } - /* end_tag indicates end-of-list */ - - if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { - break; - } - /* Get the next resource descriptor */ resource = -- cgit v1.2.3