Commit 593c70f0 authored by Patrick Mochel's avatar Patrick Mochel

ACPI: Treat acpi_root_dir as acpi_root_dir when initializing (not acpi_device_dir(acpi_root))

(and fix OOPS on boot because acpi_root is NULL).
parent 675dda54
...@@ -46,7 +46,6 @@ struct proc_dir_entry *acpi_root_dir; ...@@ -46,7 +46,6 @@ struct proc_dir_entry *acpi_root_dir;
#define STRUCT_TO_INT(s) (*((int*)&s)) #define STRUCT_TO_INT(s) (*((int*)&s))
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Device Management Device Management
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
...@@ -645,26 +644,17 @@ acpi_bus_init (void) ...@@ -645,26 +644,17 @@ acpi_bus_init (void)
status = acpi_install_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY, &acpi_bus_notify, NULL); status = acpi_install_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY, &acpi_bus_notify, NULL);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "Unable to register for device notifications\n"); printk(KERN_ERR PREFIX "Unable to register for device notifications\n");
result = -ENODEV;
goto error1; goto error1;
} }
/* /*
* Create the top ACPI proc directory * Create the top ACPI proc directory
*/ */
acpi_device_dir(acpi_root) = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL); acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL);
if (!acpi_root) {
result = -ENODEV;
goto error3;
}
acpi_root_dir = acpi_device_dir(acpi_root);
return_VALUE(0); return_VALUE(0);
/* Mimic structured exception handling */ /* Mimic structured exception handling */
error3:
acpi_remove_notify_handler(ACPI_ROOT_OBJECT,
ACPI_SYSTEM_NOTIFY, &acpi_bus_notify);
error1: error1:
acpi_terminate(); acpi_terminate();
error0: error0:
......
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