Commit 59b17bf6 authored by Len Brown's avatar Len Brown

Merge branch 'async-battery' into release

Conflicts:
	drivers/acpi/Makefile
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parents edd84690 0f66af53
...@@ -45,7 +45,6 @@ endif ...@@ -45,7 +45,6 @@ endif
# These are (potentially) separate modules # These are (potentially) separate modules
obj-$(CONFIG_ACPI_AC) += ac.o obj-$(CONFIG_ACPI_AC) += ac.o
obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_BUTTON) += button.o
obj-$(CONFIG_ACPI_FAN) += fan.o obj-$(CONFIG_ACPI_FAN) += fan.o
obj-$(CONFIG_ACPI_VIDEO) += video.o obj-$(CONFIG_ACPI_VIDEO) += video.o
...@@ -54,6 +53,7 @@ obj-$(CONFIG_ACPI_PROCESSOR) += processor.o ...@@ -54,6 +53,7 @@ obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
obj-$(CONFIG_ACPI_CONTAINER) += container.o obj-$(CONFIG_ACPI_CONTAINER) += container.o
obj-$(CONFIG_ACPI_THERMAL) += thermal.o obj-$(CONFIG_ACPI_THERMAL) += thermal.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_SBS) += sbshc.o obj-$(CONFIG_ACPI_SBS) += sbshc.o
obj-$(CONFIG_ACPI_SBS) += sbs.o obj-$(CONFIG_ACPI_SBS) += sbs.o
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/async.h>
#ifdef CONFIG_ACPI_PROCFS_POWER #ifdef CONFIG_ACPI_PROCFS_POWER
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
...@@ -903,21 +904,27 @@ static struct acpi_driver acpi_battery_driver = { ...@@ -903,21 +904,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) if (acpi_disabled)
return -ENODEV; return;
#ifdef CONFIG_ACPI_PROCFS_POWER #ifdef CONFIG_ACPI_PROCFS_POWER
acpi_battery_dir = acpi_lock_battery_dir(); acpi_battery_dir = acpi_lock_battery_dir();
if (!acpi_battery_dir) if (!acpi_battery_dir)
return -ENODEV; return;
#endif #endif
if (acpi_bus_register_driver(&acpi_battery_driver) < 0) { if (acpi_bus_register_driver(&acpi_battery_driver) < 0) {
#ifdef CONFIG_ACPI_PROCFS_POWER #ifdef CONFIG_ACPI_PROCFS_POWER
acpi_unlock_battery_dir(acpi_battery_dir); acpi_unlock_battery_dir(acpi_battery_dir);
#endif #endif
return -ENODEV; return;
} }
return;
}
static int __init acpi_battery_init(void)
{
async_schedule(acpi_battery_init_async, NULL);
return 0; return 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