summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utcache.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-08 12:31:38 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-08 12:31:38 +0200
commit6912897d7574d780994ac9a531f76c5df1669aeb (patch)
tree9fe4d0bef6270a1ecf804865dfe3cf5b18a9f24a /drivers/acpi/acpica/utcache.c
parent16b53e7e8542082ac628e9e69f6cdf725a576f81 (diff)
parentf084dbb939070281be7c882db63a4a428c51fcf4 (diff)
Merge branch 'acpica' into linux-next
* acpica: (22 commits) ACPI: Set length even for TYPE_END_TAG acpi resource ACPICA: Update version to 20130214 ACPICA: Object repair: Allow 0-length packages for variable-length packages ACPICA: Disassembler: Add warnings for unresolved control methods ACPICA: Return object repair: Add resource template repairs ACPICA: Return object repair: Add string-to-unicode conversion ACPICA: Split object conversion functions to a new file ACPICA: Add mechanism for early object repairs on a per-name basis ACPICA: Remove trailing comma in enum declarations ACPICA: Add exception descriptions to exception info table ACPICA: Add macros to exception code definitions ACPICA: Regression fix: reinstate safe exit macros ACPICA: Update for ACPI 5 hardware-reduced feature ACPICA: Add parens within macros around parameter names ACPICA: Add macros to access pointer to next object in the descriptor list ACPICA: Update error/debug messages for fixed events ACPICA: Fix a long-standing bug in local cache ACPICA: iASL/Disassembler: Add support for MTMR table ACPICA: iASL/Disassembler: Add support for VRTC table ACPICA: Update RASF table definition ...
Diffstat (limited to 'drivers/acpi/acpica/utcache.c')
-rw-r--r--drivers/acpi/acpica/utcache.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index e0e8579deaa..a877a9647fd 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -85,7 +85,6 @@ acpi_os_create_cache(char *cache_name,
/* Populate the cache object and return it */
ACPI_MEMSET(cache, 0, sizeof(struct acpi_memory_list));
- cache->link_offset = 8;
cache->list_name = cache_name;
cache->object_size = object_size;
cache->max_depth = max_depth;
@@ -108,7 +107,7 @@ acpi_os_create_cache(char *cache_name,
acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)
{
- char *next;
+ void *next;
acpi_status status;
ACPI_FUNCTION_ENTRY();
@@ -128,10 +127,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)
/* Delete and unlink one cached state object */
- next = *(ACPI_CAST_INDIRECT_PTR(char,
- &(((char *)cache->
- list_head)[cache->
- link_offset])));
+ next = ACPI_GET_DESCRIPTOR_PTR(cache->list_head);
ACPI_FREE(cache->list_head);
cache->list_head = next;
@@ -221,10 +217,7 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object)
/* Put the object at the head of the cache list */
- *(ACPI_CAST_INDIRECT_PTR(char,
- &(((char *)object)[cache->
- link_offset]))) =
- cache->list_head;
+ ACPI_SET_DESCRIPTOR_PTR(object, cache->list_head);
cache->list_head = object;
cache->current_depth++;
@@ -272,10 +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 = *(ACPI_CAST_INDIRECT_PTR(char,
- &(((char *)
- object)[cache->
- link_offset])));
+ cache->list_head = ACPI_GET_DESCRIPTOR_PTR(object);
cache->current_depth--;