Commit c6816db6 authored by Patrick Mochel's avatar Patrick Mochel

ACPI: set acpi_disabled = 1 if acpi_bus_init() fails, and check this in the

init functions for the other components.
parent c73c12e3
......@@ -1830,16 +1830,19 @@ static int __init acpi_init (void)
result = acpi_bus_init();
#ifdef CONFIG_PM
if (!result) {
#ifdef CONFIG_PM
if (!PM_IS_ACTIVE())
pm_active = 1;
else {
printk(KERN_INFO PREFIX "APM is already active, exiting\n");
acpi_disabled = 1;
result = -ENODEV;
}
}
#endif
} else
acpi_disabled = 1;
return_VALUE(result);
}
......
......@@ -90,6 +90,9 @@ static int __init acpi_debug_init(void)
ACPI_FUNCTION_TRACE("acpi_debug_init");
if (acpi_disabled)
return_VALUE(0);
/* 'debug_layer' [R/W] */
name = ACPI_SYSTEM_FILE_DEBUG_LAYER;
entry = create_proc_read_entry(name, S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir,
......
......@@ -122,6 +122,9 @@ static int __init acpi_event_init(void)
ACPI_FUNCTION_TRACE("acpi_event_init");
if (acpi_disabled)
return_VALUE(0);
/* 'event' [R] */
entry = create_proc_entry("event", S_IRUSR, acpi_root_dir);
if (entry)
......
......@@ -658,6 +658,9 @@ static int __init acpi_sleep_init(void)
ACPI_FUNCTION_TRACE("acpi_system_add_fs");
if (acpi_disabled)
return_VALUE(0);
printk(KERN_INFO PREFIX "(supports");
for (i=0; i<ACPI_S_STATE_COUNT; i++) {
u8 type_a, type_b;
......
......@@ -163,6 +163,9 @@ static int __init acpi_system_init (void)
ACPI_FUNCTION_TRACE("acpi_system_init");
if (acpi_disabled)
return_VALUE(0);
/* 'info' [R] */
name = ACPI_SYSTEM_FILE_INFO;
entry = create_proc_read_entry(name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment