From: Pavel Machek Date: Tue, 15 Aug 2006 05:37:22 +0000 (-0700) Subject: ACPI: fix boot with acpi=off X-Git-Tag: v2.6.18-rc5~75^3~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d8316d5ea4dcf0bf15d8a06d539ed7c99e9cfbe;p=linux-2.6 ACPI: fix boot with acpi=off Fix acpi_ac/battery boot with acpi=off Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 96309b9660..11abc7bf77 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -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) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 6e5221707d..9810e2a55d 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -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;