summaryrefslogtreecommitdiffstats
path: root/include/acpi/acrestyp.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-12-19 05:38:31 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 12:36:19 +0100
commitfb4e50269c73a09dd89b40d6965bb9f1ee93dd1e (patch)
treed6f43fbdddb946fe696578db27132d3c319328f0 /include/acpi/acrestyp.h
parent57bf6aefc2b9c89b89bb3fca54725ceea797bb63 (diff)
downloadblackbird-op-linux-fb4e50269c73a09dd89b40d6965bb9f1ee93dd1e.tar.gz
blackbird-op-linux-fb4e50269c73a09dd89b40d6965bb9f1ee93dd1e.zip
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>
Diffstat (limited to 'include/acpi/acrestyp.h')
-rw-r--r--include/acpi/acrestyp.h5
1 files changed, 4 insertions, 1 deletions
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 {
#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;
OpenPOWER on IntegriCloud