|
@@ -30,6 +30,7 @@
|
|
|
#include <linux/init.h>
|
|
|
#include <linux/types.h>
|
|
|
#include <linux/jiffies.h>
|
|
|
+#include <linux/async.h>
|
|
|
|
|
|
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
|
#include <linux/proc_fs.h>
|
|
@@ -901,21 +902,27 @@ static struct acpi_driver acpi_battery_driver = {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
-static int __init acpi_battery_init(void)
|
|
|
+static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie)
|
|
|
{
|
|
|
if (acpi_disabled)
|
|
|
- return -ENODEV;
|
|
|
+ return;
|
|
|
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
|
acpi_battery_dir = acpi_lock_battery_dir();
|
|
|
if (!acpi_battery_dir)
|
|
|
- return -ENODEV;
|
|
|
+ return;
|
|
|
#endif
|
|
|
if (acpi_bus_register_driver(&acpi_battery_driver) < 0) {
|
|
|
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
|
acpi_unlock_battery_dir(acpi_battery_dir);
|
|
|
#endif
|
|
|
- return -ENODEV;
|
|
|
+ return;
|
|
|
}
|
|
|
+ return;
|
|
|
+}
|
|
|
+
|
|
|
+static int __init acpi_battery_init(void)
|
|
|
+{
|
|
|
+ async_schedule(acpi_battery_init_async, NULL);
|
|
|
return 0;
|
|
|
}
|
|
|
|