diff options
-rw-r--r-- | source/components/resources/rsxface.c | 2 | ||||
-rw-r--r-- | source/include/acrestyp.h | 5 |
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 |