diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bus.c | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index c068c82..31e8da6 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -925,11 +925,13 @@ void __init acpi_early_init(void) goto error0; } - status = acpi_load_tables(); - if (ACPI_FAILURE(status)) { - printk(KERN_ERR PREFIX - "Unable to load the System Description Tables\n"); - goto error0; + if (acpi_gbl_group_module_level_code) { + status = acpi_load_tables(); + if (ACPI_FAILURE(status)) { + printk(KERN_ERR PREFIX + "Unable to load the System Description Tables\n"); + goto error0; + } } #ifdef CONFIG_X86 @@ -995,17 +997,10 @@ static int __init acpi_bus_init(void) acpi_os_initialize1(); - status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE); - if (ACPI_FAILURE(status)) { - printk(KERN_ERR PREFIX - "Unable to start the ACPI Interpreter\n"); - goto error1; - } - /* * ACPI 2.0 requires the EC driver to be loaded and work before - * the EC device is found in the namespace (i.e. before acpi_initialize_objects() - * is called). + * the EC device is found in the namespace (i.e. before + * acpi_load_tables() is called). * * This is accomplished by looking for the ECDT table, and getting * the EC parameters out of that. @@ -1013,6 +1008,22 @@ static int __init acpi_bus_init(void) status = acpi_ec_ecdt_probe(); /* Ignore result. Not having an ECDT is not fatal. */ + if (!acpi_gbl_group_module_level_code) { + status = acpi_load_tables(); + if (ACPI_FAILURE(status)) { + printk(KERN_ERR PREFIX + "Unable to load the System Description Tables\n"); + goto error1; + } + } + + status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE); + if (ACPI_FAILURE(status)) { + printk(KERN_ERR PREFIX + "Unable to start the ACPI Interpreter\n"); + goto error1; + } + status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n"); |