]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ACPI: run _OSC after ACPI_FULL_INITIALIZATION
authorLin Ming <ming.m.lin@intel.com>
Mon, 16 Jul 2012 08:30:21 +0000 (16:30 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:48:54 +0000 (03:48 +0100)
commit fc54ab72959edbf229b65ac74b2f122d799ca002 upstream.

The _OSC method may exist in module level code,
so it must be called after ACPI_FULL_INITIALIZATION

On some new platforms with Zero-Power-Optical-Disk-Drive (ZPODD)
support, this fix is necessary to save power.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Tested-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/acpi/bus.c

index 9ecec98bc76e9aa030c3c5c0c060ba283e1dcf64..5016de5e91f69e7ab4dc0531f97a229742d745ae 100644 (file)
@@ -950,14 +950,18 @@ static int __init acpi_bus_init(void)
        status = acpi_ec_ecdt_probe();
        /* Ignore result. Not having an ECDT is not fatal. */
 
-       acpi_bus_osc_support();
-
        status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
        if (ACPI_FAILURE(status)) {
                printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
                goto error1;
        }
 
+       /*
+        * _OSC method may exist in module level code,
+        * so it must be run after ACPI_FULL_INITIALIZATION
+        */
+       acpi_bus_osc_support();
+
        /*
         * _PDC control method may load dynamic SSDT tables,
         * and we need to install the table handler before that.