summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2014-03-16 21:34:16 +0800
committerZhang Rui <rui.zhang@intel.com>2014-10-10 13:57:08 +0800
commite3ec483a7e24c6ebb5eb763ee56c65c239701066 (patch)
tree77f1e5067ae9d51672f3ab5b10c9695acb8fdc9f /drivers/acpi/utils.c
parent083bf668cb70e47b84db64856606e94beac87f01 (diff)
downloadop-kernel-dev-e3ec483a7e24c6ebb5eb763ee56c65c239701066.zip
op-kernel-dev-e3ec483a7e24c6ebb5eb763ee56c65c239701066.tar.gz
ACPI: add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package()
Add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package(), so that we can use this helper for more cases like _ART/_TRT. Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r--drivers/acpi/utils.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 07c8c5a..1ed7aba9 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -149,6 +149,21 @@ acpi_extract_package(union acpi_object *package,
break;
}
break;
+ case ACPI_TYPE_LOCAL_REFERENCE:
+ switch (format_string[i]) {
+ case 'R':
+ size_required += sizeof(void *);
+ tail_offset += sizeof(void *);
+ break;
+ default:
+ printk(KERN_WARNING PREFIX "Invalid package element"
+ " [%d] got reference,"
+ " expecting [%c]\n",
+ i, format_string[i]);
+ return AE_BAD_DATA;
+ break;
+ }
+ break;
case ACPI_TYPE_PACKAGE:
default:
@@ -247,7 +262,18 @@ acpi_extract_package(union acpi_object *package,
break;
}
break;
-
+ case ACPI_TYPE_LOCAL_REFERENCE:
+ switch (format_string[i]) {
+ case 'R':
+ *(void **)head =
+ (void *)element->reference.handle;
+ head += sizeof(void *);
+ break;
+ default:
+ /* Should never get here */
+ break;
+ }
+ break;
case ACPI_TYPE_PACKAGE:
/* TBD: handle nested packages... */
default:
OpenPOWER on IntegriCloud