diff options
author | Lv Zheng <lv.zheng@intel.com> | 2012-12-19 00:38:31 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-10 06:36:19 -0500 |
commit | fb4e50269c73a09dd89b40d6965bb9f1ee93dd1e (patch) | |
tree | d6f43fbdddb946fe696578db27132d3c319328f0 | |
parent | 57bf6aefc2b9c89b89bb3fca54725ceea797bb63 (diff) |
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 <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/rsxface.c | 4 | ||||
-rw-r--r-- | include/acpi/acrestyp.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c index 5aad744b5b83..3a5ace7e5352 100644 --- a/drivers/acpi/acpica/rsxface.c +++ b/drivers/acpi/acpica/rsxface.c | |||
@@ -606,9 +606,7 @@ acpi_walk_resources(acpi_handle device_handle, | |||
606 | 606 | ||
607 | /* Get the next resource descriptor */ | 607 | /* Get the next resource descriptor */ |
608 | 608 | ||
609 | resource = | 609 | resource = ACPI_NEXT_RESOURCE(resource); |
610 | ACPI_ADD_PTR(struct acpi_resource, resource, | ||
611 | resource->length); | ||
612 | } | 610 | } |
613 | 611 | ||
614 | ACPI_FREE(buffer.pointer); | 612 | ACPI_FREE(buffer.pointer); |
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 40349ae65464..17f2d050604e 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h | |||
@@ -591,7 +591,10 @@ struct acpi_resource { | |||
591 | #define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12) | 591 | #define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12) |
592 | #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) | 592 | #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) |
593 | 593 | ||
594 | #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) | 594 | /* Macro for walking resource templates with multiple descriptors */ |
595 | |||
596 | #define ACPI_NEXT_RESOURCE(res) \ | ||
597 | ACPI_ADD_PTR (struct acpi_resource, (res), (res)->length) | ||
595 | 598 | ||
596 | struct acpi_pci_routing_table { | 599 | struct acpi_pci_routing_table { |
597 | u32 length; | 600 | u32 length; |