ACPICA: Namespace: Add scope information to the simple object repair mechanism
authorLv Zheng <lv.zheng@intel.com>
Tue, 29 Dec 2015 05:57:38 +0000 (13:57 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jan 2016 02:47:36 +0000 (03:47 +0100)
ACPICA commit 51cbd324420ca5e381cb2c57ce95139053518a35

The acpi_object_converter callbacks are lack in scope information to
convert name_string. This patch fixes this issue by passing the evaluation
method/object node to the converter callbacks. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/51cbd324
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/aclocal.h
drivers/acpi/acpica/acnamesp.h
drivers/acpi/acpica/nsconvert.c
drivers/acpi/acpica/nsrepair.c

index 4fd50404245b35740126875306f528c06cd87396..351a1cd64b35f8122820abe8a8a3d5c42bc790c2 100644 (file)
@@ -395,7 +395,8 @@ union acpi_predefined_info {
 
 /* Return object auto-repair info */
 
-typedef acpi_status(*acpi_object_converter) (union acpi_operand_object
+typedef acpi_status(*acpi_object_converter) (struct acpi_namespace_node * scope,
+                                            union acpi_operand_object
                                             *original_object,
                                             union acpi_operand_object
                                             **converted_object);
index 5d261c942a0d129150ab76c05e82af9b1ab43a2e..1f42c3c30ff70bd7023abfca14c9ecc5246df749 100644 (file)
@@ -183,11 +183,13 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
                          union acpi_operand_object **return_object);
 
 acpi_status
-acpi_ns_convert_to_unicode(union acpi_operand_object *original_object,
+acpi_ns_convert_to_unicode(struct acpi_namespace_node *scope,
+                          union acpi_operand_object *original_object,
                           union acpi_operand_object **return_object);
 
 acpi_status
-acpi_ns_convert_to_resource(union acpi_operand_object *original_object,
+acpi_ns_convert_to_resource(struct acpi_namespace_node *scope,
+                           union acpi_operand_object *original_object,
                            union acpi_operand_object **return_object);
 
 /*
index 749a18902dcf0819d41c7a2a6919e2885761eeaf..ab47a50cc101012a48d57bee0e9be8e69e2317e6 100644 (file)
@@ -306,7 +306,8 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
  *
  * FUNCTION:    acpi_ns_convert_to_unicode
  *
- * PARAMETERS:  original_object     - ASCII String Object to be converted
+ * PARAMETERS:  scope               - Namespace node for the method/object
+ *              original_object     - ASCII String Object to be converted
  *              return_object       - Where the new converted object is returned
  *
  * RETURN:      Status. AE_OK if conversion was successful.
@@ -316,7 +317,8 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
  ******************************************************************************/
 
 acpi_status
-acpi_ns_convert_to_unicode(union acpi_operand_object *original_object,
+acpi_ns_convert_to_unicode(struct acpi_namespace_node * scope,
+                          union acpi_operand_object *original_object,
                           union acpi_operand_object **return_object)
 {
        union acpi_operand_object *new_object;
@@ -370,7 +372,8 @@ acpi_ns_convert_to_unicode(union acpi_operand_object *original_object,
  *
  * FUNCTION:    acpi_ns_convert_to_resource
  *
- * PARAMETERS:  original_object     - Object to be converted
+ * PARAMETERS:  scope               - Namespace node for the method/object
+ *              original_object     - Object to be converted
  *              return_object       - Where the new converted object is returned
  *
  * RETURN:      Status. AE_OK if conversion was successful
@@ -381,7 +384,8 @@ acpi_ns_convert_to_unicode(union acpi_operand_object *original_object,
  ******************************************************************************/
 
 acpi_status
-acpi_ns_convert_to_resource(union acpi_operand_object *original_object,
+acpi_ns_convert_to_resource(struct acpi_namespace_node * scope,
+                           union acpi_operand_object *original_object,
                            union acpi_operand_object **return_object)
 {
        union acpi_operand_object *new_object;
index 360e3ab3e956ad7d0fd50ec4692aa3718adab0f6..4b7dbff66a144491bb1a10ab6fc04a2a63cfa56c 100644 (file)
@@ -172,8 +172,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 */