]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ACPI: invoke acpi_sleep_init() earlier
authorAlexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Sat, 10 Feb 2007 06:32:16 +0000 (01:32 -0500)
committerLen Brown <len.brown@intel.com>
Sat, 10 Feb 2007 06:32:16 +0000 (01:32 -0500)
late_initcall() is too late for acpi_sleep_init().
Call it directly from acpi_init code.

http://bugzilla.kernel.org/show_bug.cgi?id=7887

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/bus.c
drivers/acpi/sleep/main.c
include/acpi/acpi_drivers.h

index c26468da429507be4ccef20e3f1b57165d860d85..41cebe5bc8071382c7882b6d7820a1b7b450cda8 100644 (file)
@@ -147,7 +147,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
                        *state = ACPI_STATE_D0;
        } else {
                /*
-                * Get the device's power state either directly (via _PSC) or 
+                * Get the device's power state either directly (via _PSC) or
                 * indirectly (via power resources).
                 */
                if (device->power.flags.explicit_get) {
@@ -462,7 +462,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
                                  "Received BUS CHECK notification for device [%s]\n",
                                  device->pnp.bus_id));
                result = acpi_bus_check_scope(device);
-               /* 
+               /*
                 * TBD: We'll need to outsource certain events to non-ACPI
                 *      drivers via the device manager (device.c).
                 */
@@ -473,7 +473,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
                                  "Received DEVICE CHECK notification for device [%s]\n",
                                  device->pnp.bus_id));
                result = acpi_bus_check_device(device, NULL);
-               /* 
+               /*
                 * TBD: We'll need to outsource certain events to non-ACPI
                 *      drivers via the device manager (device.c).
                 */
@@ -543,7 +543,7 @@ static int __init acpi_bus_init_irq(void)
        char *message = NULL;
 
 
-       /* 
+       /*
         * Let the system know what interrupt model we are using by
         * evaluating the \_PIC object, if exists.
         */
@@ -684,7 +684,7 @@ static int __init acpi_bus_init(void)
         * the EC device is found in the namespace (i.e. before acpi_initialize_objects()
         * is called).
         *
-        * This is accomplished by looking for the ECDT table, and getting 
+        * This is accomplished by looking for the ECDT table, and getting
         * the EC parameters out of that.
         */
        status = acpi_ec_ecdt_probe();
@@ -699,6 +699,9 @@ static int __init acpi_bus_init(void)
 
        printk(KERN_INFO PREFIX "Interpreter enabled\n");
 
+       /* Initialize sleep structures */
+       acpi_sleep_init();
+
        /*
         * Get the system interrupt model and evaluate \_PIC.
         */
index 62ce87d7165101078aa829b73294dd6922e1519a..37a0930fc0a6ac538fbb2407e3ebb6f71a203753 100644 (file)
@@ -200,7 +200,7 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
        {},
 };
 
-static int __init acpi_sleep_init(void)
+int __init acpi_sleep_init(void)
 {
        int i = 0;
 
@@ -229,4 +229,3 @@ static int __init acpi_sleep_init(void)
        return 0;
 }
 
-late_initcall(acpi_sleep_init);
index 4dc8a5043ef033fd35042be6ad0999233c8db0ad..ce0e62fb28c16084e00806b4b8b327b7ab37eddf 100644 (file)
@@ -128,4 +128,14 @@ extern void unregister_hotplug_dock_device(acpi_handle handle);
 #define register_hotplug_dock_device(h1, h2, c)        (-ENODEV)
 #define unregister_hotplug_dock_device(h)       do { } while(0)
 #endif
+
+/*--------------------------------------------------------------------------
+                                  Suspend/Resume
+  -------------------------------------------------------------------------- */
+#ifdef CONFIG_ACPI_SLEEP
+extern int acpi_sleep_init(void);
+#else
+#define acpi_sleep_init() do {} while (0)
+#endif
+
 #endif /*__ACPI_DRIVERS_H__*/