Commit 1d3e216f authored by Mike Rapoport's avatar Mike Rapoport Committed by Eric Miao

[ARM] pxa/em-x270: fix compile failure when CONFIG_APM_EMULATION=n

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: default avatarMike Rapoport <mike@compulab.co.il>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent ecf763c5
...@@ -1141,12 +1141,16 @@ struct power_supply_info em_x270_psy_info = { ...@@ -1141,12 +1141,16 @@ struct power_supply_info em_x270_psy_info = {
static void em_x270_battery_low(void) static void em_x270_battery_low(void)
{ {
#if defined(CONFIG_APM_EMULATION)
apm_queue_event(APM_LOW_BATTERY); apm_queue_event(APM_LOW_BATTERY);
#endif
} }
static void em_x270_battery_critical(void) static void em_x270_battery_critical(void)
{ {
#if defined(CONFIG_APM_EMULATION)
apm_queue_event(APM_CRITICAL_SUSPEND); apm_queue_event(APM_CRITICAL_SUSPEND);
#endif
} }
struct da9030_battery_info em_x270_batterty_info = { struct da9030_battery_info em_x270_batterty_info = {
......
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