]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ACPICA: Windows compatibility: autoexecute root _INI method
authorBob Moore <robert.moore@intel.com>
Thu, 3 Sep 2009 02:21:03 +0000 (10:21 +0800)
committerLen Brown <len.brown@intel.com>
Wed, 9 Sep 2009 02:28:34 +0000 (22:28 -0400)
Add support for execution of an _INI method at the namespace root.
Although not defined in the ACPI specification, this support was
added to Windows around the Vista timeframe. It is added here
for Windows compatibility.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/acpica/nsinit.c

index 2adfcf329e159c16795948dde91cc293fb3b35a5..1d5b360eb25be101ff0402f301cfbb163adc7240 100644 (file)
@@ -170,6 +170,21 @@ acpi_status acpi_ns_initialize_devices(void)
                goto error_exit;
        }
 
+       /*
+        * Execute the "global" _INI method that may appear at the root. This
+        * support is provided for Windows compatibility (Vista+) and is not
+        * part of the ACPI specification.
+        */
+       info.evaluate_info->prefix_node = acpi_gbl_root_node;
+       info.evaluate_info->pathname = METHOD_NAME__INI;
+       info.evaluate_info->parameters = NULL;
+       info.evaluate_info->flags = ACPI_IGNORE_RETURN_VALUE;
+
+       status = acpi_ns_evaluate(info.evaluate_info);
+       if (ACPI_SUCCESS(status)) {
+               info.num_INI++;
+       }
+
        /* Walk namespace to execute all _INIs on present devices */
 
        status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,