summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/psargs.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2015-12-29 09:00:14 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-01 05:47:37 +0300
commitae90fbf562d733a392c7a0ffefe1e09b5a31c99c (patch)
treeeddb891282808df59d6de8c3e4b5837ae1b6d065 /drivers/acpi/acpica/psargs.c
parent89438f96f2c6d31e1d7594714475c582afe03329 (diff)
downloadlinux-ae90fbf562d733a392c7a0ffefe1e09b5a31c99c.tar.xz
ACPICA: Parser: Fix for SuperName method invocation
ACPICA commit 4b86d1046d06e462dae83ebcd5a66cc132a08f8f SuperName parameters that are in fact control method invocations were not handled correctly by the parser. This change fixes the problem by identifying these properly as method invocations. This affects about 14 different ASL operators that contain SuperName parameters. ACPICA BZ 1002. Link: https://github.com/acpica/acpica/commit/4b86d104 Link: https://bugs.acpica.org/show_bug.cgi?id=1002 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/psargs.c')
-rw-r--r--drivers/acpi/acpica/psargs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 0fdb7fc4824a..f84e54661ba7 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -269,7 +269,8 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
*/
if (ACPI_SUCCESS(status) &&
possible_method_call && (node->type == ACPI_TYPE_METHOD)) {
- if (walk_state->opcode == AML_UNLOAD_OP) {
+ if (GET_CURRENT_ARG_TYPE(walk_state->arg_types) ==
+ ARGP_SUPERNAME) {
/*
* acpi_ps_get_next_namestring has increased the AML pointer,
* so we need to restore the saved AML pointer for method call.
@@ -696,7 +697,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
*
* PARAMETERS: walk_state - Current state
* parser_state - Current parser state object
- * arg_type - The argument type (AML_*_ARG)
+ * arg_type - The parser argument type (ARGP_*)
* return_arg - Where the next arg is returned
*
* RETURN: Status, and an op object containing the next argument.
@@ -815,9 +816,9 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(AE_NO_MEMORY);
}
- /* To support super_name arg of Unload */
+ /* super_name allows argument to be a method call */
- if (walk_state->opcode == AML_UNLOAD_OP) {
+ if (arg_type == ARGP_SUPERNAME) {
status =
acpi_ps_get_next_namepath(walk_state,
parser_state, arg,