]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[ARM] pxa/em-x270: fix compile failure when CONFIG_APM_EMULATION=n
authorMike Rapoport <mike@compulab.co.il>
Tue, 21 Jul 2009 14:09:52 +0000 (17:09 +0300)
committerEric Miao <eric.y.miao@gmail.com>
Thu, 23 Jul 2009 02:43:40 +0000 (10:43 +0800)
If CONFIG_APM_EMULATION=n em-x270 build fails with linker error:

arch/arm/mach-pxa/built-in.o: In function `em_x270_battery_critical': em-x270.c:(.text+0x12c0): undefined reference to `apm_queue_event'
arch/arm/mach-pxa/built-in.o: In function `em_x270_battery_low': em-x270.c:(.text+0x12c8): undefined reference to `apm_queue_event'
make: *** [.tmp_vmlinux1] Error 1

Fix it.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
arch/arm/mach-pxa/em-x270.c

index 63b10d9bb1d3a374908206d78fb5cc2426a408e5..9cd09465a0e8bbb9474e22d24160de5ef50500a5 100644 (file)
@@ -1141,12 +1141,16 @@ struct power_supply_info em_x270_psy_info = {
 
 static void em_x270_battery_low(void)
 {
+#if defined(CONFIG_APM_EMULATION)
        apm_queue_event(APM_LOW_BATTERY);
+#endif
 }
 
 static void em_x270_battery_critical(void)
 {
+#if defined(CONFIG_APM_EMULATION)
        apm_queue_event(APM_CRITICAL_SUSPEND);
+#endif
 }
 
 struct da9030_battery_info em_x270_batterty_info = {