From fb4e50269c73a09dd89b40d6965bb9f1ee93dd1e Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 19 Dec 2012 05:38:31 +0000 Subject: ACPICA: Resource Manager: update template walking with ACPI_NEXT_RESOURCE. Cleanup the ACPI_NEXT_RESOURCE macro. Update AcpiWalkResources to use ACPI_NEXT_RESOURCE. Lv Zheng. Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acrestyp.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 40349ae6546..17f2d050604 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -591,7 +591,10 @@ struct acpi_resource { #define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12) #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) -#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) +/* Macro for walking resource templates with multiple descriptors */ + +#define ACPI_NEXT_RESOURCE(res) \ + ACPI_ADD_PTR (struct acpi_resource, (res), (res)->length) struct acpi_pci_routing_table { u32 length; -- cgit v1.2.3