[ACPI] fix pnpacpi regression resulting from ACPICA 20051117
authorLen Brown <len.brown@intel.com>
Thu, 5 Jan 2006 07:40:11 +0000 (02:40 -0500)
committerLen Brown <len.brown@intel.com>
Thu, 5 Jan 2006 07:40:11 +0000 (02:40 -0500)
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 <len.brown@intel.com>
drivers/acpi/resources/rsxface.c

index 50a956b705b00164275ae6c9ef2b9d563055f624..5408e5d10cc34bf2fc3547d0aa30d9745d4938e4 100644 (file)
@@ -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 =