ACPI: fix boot with acpi=off
authorPavel Machek <pavel@ucw.cz>
Tue, 15 Aug 2006 05:37:22 +0000 (22:37 -0700)
committerLen Brown <len.brown@intel.com>
Wed, 16 Aug 2006 03:16:43 +0000 (23:16 -0400)
Fix acpi_ac/battery boot with acpi=off

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/ac.c
drivers/acpi/battery.c

index 96309b9..11abc7b 100644 (file)
@@ -285,6 +285,8 @@ static int __init acpi_ac_init(void)
 {
        int result;
 
+       if (acpi_disabled)
+               return -ENODEV;
 
        acpi_ac_dir = acpi_lock_ac_dir();
        if (!acpi_ac_dir)
index 6e52217..9810e2a 100644 (file)
@@ -757,6 +757,9 @@ static int __init acpi_battery_init(void)
 {
        int result;
 
+       if (acpi_disabled)
+               return -ENODEV;
+
        acpi_battery_dir = acpi_lock_battery_dir();
        if (!acpi_battery_dir)
                return -ENODEV;