From a93a15545833332fbc1f8acc37315edc1a8f7507 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 19 Dec 2012 05:38:31 +0000 Subject: [PATCH] --- yaml --- r: 350870 b: refs/heads/master c: fb4e50269c73a09dd89b40d6965bb9f1ee93dd1e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/acpica/rsxface.c | 4 +--- trunk/include/acpi/acrestyp.h | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d56fcc7554af..94d0856a9410 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 57bf6aefc2b9c89b89bb3fca54725ceea797bb63 +refs/heads/master: fb4e50269c73a09dd89b40d6965bb9f1ee93dd1e diff --git a/trunk/drivers/acpi/acpica/rsxface.c b/trunk/drivers/acpi/acpica/rsxface.c index 5aad744b5b83..3a5ace7e5352 100644 --- a/trunk/drivers/acpi/acpica/rsxface.c +++ b/trunk/drivers/acpi/acpica/rsxface.c @@ -606,9 +606,7 @@ acpi_walk_resources(acpi_handle device_handle, /* Get the next resource descriptor */ - resource = - ACPI_ADD_PTR(struct acpi_resource, resource, - resource->length); + resource = ACPI_NEXT_RESOURCE(resource); } ACPI_FREE(buffer.pointer); diff --git a/trunk/include/acpi/acrestyp.h b/trunk/include/acpi/acrestyp.h index 40349ae65464..17f2d050604e 100644 --- a/trunk/include/acpi/acrestyp.h +++ b/trunk/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;