]> err.no Git - linux-2.6/commitdiff
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 96309b9660da886434d6ee44ae3581564a05a0ea..11abc7bf777ef90626eac53d0aec8e32f0228bde 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 6e5221707d9757de15030edb0a08f1d8caa7c89f..9810e2a55d0adf3fb77758b20b9b670f3e2f5342 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;