ACPICA: Add macros to access pointer to next object in the descriptor list
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index 2de22fb..a877a96 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -127,9 +127,7 @@
/* Delete and unlink one cached state object */
- next =
- ((struct acpi_object_common *)cache->list_head)->
- next_object;
+ next = ACPI_GET_DESCRIPTOR_PTR(cache->list_head);
ACPI_FREE(cache->list_head);
cache->list_head = next;
@@ -219,8 +217,7 @@
/* Put the object at the head of the cache list */
- ((struct acpi_object_common *)object)->next_object =
- cache->list_head;
+ ACPI_SET_DESCRIPTOR_PTR(object, cache->list_head);
cache->list_head = object;
cache->current_depth++;
@@ -268,8 +265,7 @@
/* There is an object available, use it */
object = cache->list_head;
- cache->list_head =
- ((struct acpi_object_common *)object)->next_object;
+ cache->list_head = ACPI_GET_DESCRIPTOR_PTR(object);
cache->current_depth--;