ACPI: call acpi_ec_init() explicitly rather than as initcall
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 24 Mar 2009 22:49:48 +0000 (16:49 -0600)
committerLen Brown <len.brown@intel.com>
Fri, 27 Mar 2009 16:50:02 +0000 (12:50 -0400)
This patch makes acpi_init() call acpi_ec_init() directly.
Previously, both were subsys_initcalls.  acpi_ec_init()
must happen after acpi_init(), and it's better to call it
explicitly rather than rely on link ordering.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/bus.c
drivers/acpi/ec.c
drivers/acpi/internal.h

index cdd11fda5036225e364f638ed990fc8a998d6156..9ca683794370bdefbb78e57636e61c5c283eeb5d 100644 (file)
@@ -880,6 +880,7 @@ static int __init acpi_init(void)
        dmi_check_system(power_nocheck_dmi_table);
 
        acpi_scan_init();
+       acpi_ec_init();
        return result;
 }
 
index 2fe15060dcdc2c3a51dd9f3ef20171e0b4e50c8e..bf88f1803801c87f70a77df4ba416a85ba98db95 100644 (file)
@@ -1069,13 +1069,10 @@ static struct acpi_driver acpi_ec_driver = {
                },
 };
 
-static int __init acpi_ec_init(void)
+int __init acpi_ec_init(void)
 {
        int result = 0;
 
-       if (acpi_disabled)
-               return 0;
-
        acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir);
        if (!acpi_ec_dir)
                return -ENODEV;
@@ -1090,8 +1087,6 @@ static int __init acpi_ec_init(void)
        return result;
 }
 
-subsys_initcall(acpi_ec_init);
-
 /* EC driver currently not unloadable */
 #if 0
 static void __exit acpi_ec_exit(void)
index 28042c0f2ffff4e55f3e29374157a887b7fc7d9b..fad8e38ed271c8d55feb01fff4df46c3f49cb5cd 100644 (file)
@@ -17,6 +17,7 @@ extern int acpi_power_nocheck;
 /* --------------------------------------------------------------------------
                                   Embedded Controller
    -------------------------------------------------------------------------- */
+int acpi_ec_init(void);
 int acpi_ec_ecdt_probe(void);
 int acpi_boot_ec_enable(void);