Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
[pandora-kernel.git] / drivers / acpi / bus.c
index bee64b7..ae862f1 100644 (file)
@@ -39,6 +39,8 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
+#include "internal.h"
+
 #define _COMPONENT             ACPI_BUS_COMPONENT
 ACPI_MODULE_NAME("bus");
 
@@ -310,7 +312,7 @@ int acpi_bus_set_power(acpi_handle handle, int state)
       end:
        if (result)
                printk(KERN_WARNING PREFIX
-                             "Transitioning device [%s] to D%d\n",
+                             "Device [%s] failed to transition to D%d\n",
                              device->pnp.bus_id, state);
        else {
                device->power.state = state;
@@ -846,6 +848,7 @@ static int __init acpi_init(void)
                acpi_kobj = NULL;
        }
 
+       init_acpi_device_notify();
        result = acpi_bus_init();
 
        if (!result) {
@@ -860,11 +863,23 @@ static int __init acpi_init(void)
                }
        } else
                disable_acpi();
+
+       if (acpi_disabled)
+               return result;
+
        /*
         * If the laptop falls into the DMI check table, the power state check
         * will be disabled in the course of device power transistion.
         */
        dmi_check_system(power_nocheck_dmi_table);
+
+       acpi_scan_init();
+       acpi_ec_init();
+       acpi_power_init();
+       acpi_system_init();
+       acpi_debug_init();
+       acpi_sleep_proc_init();
+       acpi_wakeup_device_init();
        return result;
 }