From 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 25 Mar 2016 03:53:42 -0300 Subject: Linux-libre 4.5-gnu --- drivers/acpi/acpica/nsrepair.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'drivers/acpi/acpica/nsrepair.c') diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c index 77d8103d0..805e36de8 100644 --- a/drivers/acpi/acpica/nsrepair.c +++ b/drivers/acpi/acpica/nsrepair.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -116,6 +116,11 @@ static const struct acpi_simple_repair_info acpi_object_repair_info[] = { ACPI_NOT_PACKAGE_ELEMENT, acpi_ns_convert_to_resource}, + /* Object reference conversions */ + + {"_DEP", ACPI_RTYPE_STRING, ACPI_ALL_PACKAGE_ELEMENTS, + acpi_ns_convert_to_reference}, + /* Unicode conversions */ {"_MLS", ACPI_RTYPE_STRING, 1, @@ -172,8 +177,8 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info, "Missing expected return value")); } - status = - predefined->object_converter(return_object, &new_object); + status = predefined->object_converter(info->node, return_object, + &new_object); if (ACPI_FAILURE(status)) { /* A fatal error occurred during a conversion */ @@ -360,12 +365,15 @@ static const struct acpi_simple_repair_info *acpi_ns_match_simple_repair(struct /* Check if we can actually repair this name/type combination */ if ((return_btype & this_name->unexpected_btypes) && - (package_index == this_name->package_index)) { + (this_name->package_index == + ACPI_ALL_PACKAGE_ELEMENTS + || package_index == this_name->package_index)) { return (this_name); } return (NULL); } + this_name++; } @@ -521,6 +529,7 @@ acpi_ns_remove_null_elements(struct acpi_evaluate_info *info, *dest = *source; dest++; } + source++; } @@ -572,8 +581,8 @@ acpi_ns_wrap_with_package(struct acpi_evaluate_info *info, ACPI_FUNCTION_NAME(ns_wrap_with_package); /* - * Create the new outer package and populate it. The new package will - * have a single element, the lone sub-object. + * Create the new outer package and populate it. The new + * package will have a single element, the lone sub-object. */ pkg_obj_desc = acpi_ut_create_package_object(1); if (!pkg_obj_desc) { -- cgit v1.2.3-54-g00ecf