Commit 434b274f authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] /proc/acpi files appear in /proc if acpi=off (Shaohua David Li)

parent 1589887a
...@@ -336,6 +336,9 @@ acpi_bus_register_driver ( ...@@ -336,6 +336,9 @@ acpi_bus_register_driver (
ACPI_FUNCTION_TRACE("acpi_bus_register_driver"); ACPI_FUNCTION_TRACE("acpi_bus_register_driver");
if (acpi_disabled)
return_VALUE(-ENODEV);
if (driver) { if (driver) {
spin_lock(&acpi_device_lock); spin_lock(&acpi_device_lock);
list_add_tail(&driver->node, &acpi_bus_drivers); list_add_tail(&driver->node, &acpi_bus_drivers);
......
...@@ -374,6 +374,9 @@ static int acpi_sleep_proc_init(void) ...@@ -374,6 +374,9 @@ static int acpi_sleep_proc_init(void)
{ {
struct proc_dir_entry *entry = NULL; struct proc_dir_entry *entry = NULL;
if (acpi_disabled)
return 0;
/* 'sleep' [R/W]*/ /* 'sleep' [R/W]*/
entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP, entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP,
S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
......
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