Commit 675dda54 authored by Patrick Mochel's avatar Patrick Mochel

ACPI: Remove call to acpi_ec_ecdt_probe() in acpi_bus_init() and make it a part

of acpi_ec_init().
parent a3377f2f
......@@ -122,11 +122,6 @@
#define ACPI_EC_DEVICE_NAME "Embedded Controller"
#define ACPI_EC_FILE_INFO "info"
#ifdef CONFIG_ACPI_EC
int acpi_ec_ecdt_probe (void);
#endif
/* --------------------------------------------------------------------------
Fan
-------------------------------------------------------------------------- */
......
......@@ -624,19 +624,6 @@ acpi_bus_init (void)
goto error1;
}
#ifdef CONFIG_ACPI_EC
/*
* ACPI 2.0 requires the EC driver to be loaded and work before
* the EC device is found in the namespace. This is accomplished
* by looking for the ECDT table, and getting the EC parameters out
* of that.
*/
result = acpi_ec_ecdt_probe();
if (result) {
goto error1;
}
#endif
status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
......
......@@ -723,7 +723,7 @@ acpi_ec_stop (
}
int __init
static int __init
acpi_ec_ecdt_probe (void)
{
acpi_status status;
......@@ -790,18 +790,23 @@ static int __init acpi_ec_init (void)
if (acpi_disabled)
return_VALUE(0);
result = acpi_bus_register_driver(&acpi_ec_driver);
if (result < 0) {
remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);
return_VALUE(-ENODEV);
}
/*
* ACPI 2.0 requires the EC driver to be loaded and work before
* the EC device is found in the namespace. This is accomplished
* by looking for the ECDT table, and getting the EC parameters out
* of that.
*/
result = acpi_ec_ecdt_probe();
return_VALUE(0);
/* Now register the driver for the EC */
if (!result)
result = acpi_bus_register_driver(&acpi_ec_driver);
return_VALUE(result);
}
subsys_initcall(acpi_ec_init);
void __exit
static void __exit
acpi_ec_ecdt_exit (void)
{
if (!ec_ecdt)
......@@ -815,7 +820,7 @@ acpi_ec_ecdt_exit (void)
kfree(ec_ecdt);
}
void __exit
static void __exit
acpi_ec_exit (void)
{
int result = 0;
......
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