summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2012-11-02 13:06:50 -0700
committerRobert Moore <Robert.Moore@intel.com>2012-11-02 13:06:50 -0700
commitc181ce2d1f7a27d12a9fe9c7680d7a77a849ccd7 (patch)
treedccc0df8a99fe8901f5cb124cb4f384aae2f116d
parentf16551e06a00b21cc386ac9f46306b4f6552a747 (diff)
downloadacpica-c181ce2d1f7a27d12a9fe9c7680d7a77a849ccd7.tar.gz
Resource Manager: update template walking with ACPI_NEXT_RESOURCE.
Cleanup the ACPI_NEXT_RESOURCE macro. Update AcpiWalkResources to use ACPI_NEXT_RESOURCE. Lv Zheng.
-rw-r--r--source/components/resources/rsxface.c2
-rw-r--r--source/include/acrestyp.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c
index 5733af084..d153984fe 100644
--- a/source/components/resources/rsxface.c
+++ b/source/components/resources/rsxface.c
@@ -751,7 +751,7 @@ AcpiWalkResources (
/* Get the next resource descriptor */
- Resource = ACPI_ADD_PTR (ACPI_RESOURCE, Resource, Resource->Length);
+ Resource = ACPI_NEXT_RESOURCE (Resource);
}
ACPI_FREE (Buffer.Pointer);
diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h
index 4af01e03c..f6f51a346 100644
--- a/source/include/acrestyp.h
+++ b/source/include/acrestyp.h
@@ -747,7 +747,10 @@ typedef struct acpi_resource
#define ACPI_RS_SIZE_MIN (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
#define ACPI_RS_SIZE(Type) (UINT32) (ACPI_RS_SIZE_NO_DATA + sizeof (Type))
-#define ACPI_NEXT_RESOURCE(Res) (ACPI_RESOURCE *)((UINT8 *) Res + Res->Length)
+/* Macro for walking resource templates with multiple descriptors */
+
+#define ACPI_NEXT_RESOURCE(Res) \
+ ACPI_ADD_PTR (ACPI_RESOURCE, (Res), (Res)->Length)
typedef struct acpi_pci_routing_table