summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/utcache.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-03-08 13:21:54 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-12 03:45:04 +0400
commit1af89271711b23ff9eee66de018bc92eb347ea68 (patch)
tree28a21a8cab522f6f453fc3c2832bd0fabb929cd5 /drivers/acpi/acpica/utcache.c
parentd4d32195ff070acca43577250adee6b210decdd3 (diff)
downloadlinux-1af89271711b23ff9eee66de018bc92eb347ea68.tar.xz
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>
Diffstat (limited to 'drivers/acpi/acpica/utcache.c')
-rw-r--r--drivers/acpi/acpica/utcache.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index 2de22fbacf4b..a877a9647fd9 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -127,9 +127,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)
/* 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 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object)
/* 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 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
/* 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--;