aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-04-05 01:48:46 -0400
committerLen Brown <len.brown@intel.com>2009-04-05 01:48:46 -0400
commit59b17bf6ea06abed519dfc788fff1b6b9499d23f (patch)
tree6f7e870659f91e753dc515cc1b8702420dd6a81e /drivers
parentedd84690d15e4cb144cc60b754d4eaf8fac0a711 (diff)
parent0f66af530116e9f4dd97f328d91718b56a6fc5a4 (diff)
Merge branch 'async-battery' into release
Conflicts: drivers/acpi/Makefile Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/Makefile2
-rw-r--r--drivers/acpi/battery.c15
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 4d4e3e02fcb7..03a985be3fe3 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -45,7 +45,6 @@ endif
45 45
46# These are (potentially) separate modules 46# These are (potentially) separate modules
47obj-$(CONFIG_ACPI_AC) += ac.o 47obj-$(CONFIG_ACPI_AC) += ac.o
48obj-$(CONFIG_ACPI_BATTERY) += battery.o
49obj-$(CONFIG_ACPI_BUTTON) += button.o 48obj-$(CONFIG_ACPI_BUTTON) += button.o
50obj-$(CONFIG_ACPI_FAN) += fan.o 49obj-$(CONFIG_ACPI_FAN) += fan.o
51obj-$(CONFIG_ACPI_VIDEO) += video.o 50obj-$(CONFIG_ACPI_VIDEO) += video.o
@@ -54,6 +53,7 @@ obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
54obj-$(CONFIG_ACPI_CONTAINER) += container.o 53obj-$(CONFIG_ACPI_CONTAINER) += container.o
55obj-$(CONFIG_ACPI_THERMAL) += thermal.o 54obj-$(CONFIG_ACPI_THERMAL) += thermal.o
56obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o 55obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
56obj-$(CONFIG_ACPI_BATTERY) += battery.o
57obj-$(CONFIG_ACPI_SBS) += sbshc.o 57obj-$(CONFIG_ACPI_SBS) += sbshc.o
58obj-$(CONFIG_ACPI_SBS) += sbs.o 58obj-$(CONFIG_ACPI_SBS) += sbs.o
59 59
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 09a2240d5605..5dfe18bf24cb 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -30,6 +30,7 @@
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/types.h> 31#include <linux/types.h>
32#include <linux/jiffies.h> 32#include <linux/jiffies.h>
33#include <linux/async.h>
33 34
34#ifdef CONFIG_ACPI_PROCFS_POWER 35#ifdef CONFIG_ACPI_PROCFS_POWER
35#include <linux/proc_fs.h> 36#include <linux/proc_fs.h>
@@ -903,21 +904,27 @@ static struct acpi_driver acpi_battery_driver = {
903 }, 904 },
904}; 905};
905 906
906static int __init acpi_battery_init(void) 907static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie)
907{ 908{
908 if (acpi_disabled) 909 if (acpi_disabled)
909 return -ENODEV; 910 return;
910#ifdef CONFIG_ACPI_PROCFS_POWER 911#ifdef CONFIG_ACPI_PROCFS_POWER
911 acpi_battery_dir = acpi_lock_battery_dir(); 912 acpi_battery_dir = acpi_lock_battery_dir();
912 if (!acpi_battery_dir) 913 if (!acpi_battery_dir)
913 return -ENODEV; 914 return;
914#endif 915#endif
915 if (acpi_bus_register_driver(&acpi_battery_driver) < 0) { 916 if (acpi_bus_register_driver(&acpi_battery_driver) < 0) {
916#ifdef CONFIG_ACPI_PROCFS_POWER 917#ifdef CONFIG_ACPI_PROCFS_POWER
917 acpi_unlock_battery_dir(acpi_battery_dir); 918 acpi_unlock_battery_dir(acpi_battery_dir);
918#endif 919#endif
919 return -ENODEV; 920 return;
920 } 921 }
922 return;
923}
924
925static int __init acpi_battery_init(void)
926{
927 async_schedule(acpi_battery_init_async, NULL);
921 return 0; 928 return 0;
922} 929}
923 930