diff options
author | Stefan Schmidt <stefan@datenfreihafen.org> | 2010-02-16 16:42:55 -0500 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-03-01 18:40:52 -0500 |
commit | 98acdbe4cf83f5a2e21c7aac830146b5d6da9282 (patch) | |
tree | d5200b21c99bd57d4e1464655e1605f11f6a4efe | |
parent | cfab57e0e44631b1369e05efa54031b993511c2f (diff) |
[ARM] pxa: define zeus_power_off() only when CONFIG_PM enabled
Add some safety check for CONFIG_PM around zeus_power_off(). Without
it linking can fail like this:
arch/arm/mach-pxa/built-in.o: In function `zeus_power_off':
e800.c:(.text+0x2bc8): undefined reference to `pxa27x_cpu_suspend'
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Acked-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/zeus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 9c2ec776f601..765e6189f7ba 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -621,11 +621,15 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = { | |||
621 | .udc_command = zeus_udc_command, | 621 | .udc_command = zeus_udc_command, |
622 | }; | 622 | }; |
623 | 623 | ||
624 | #ifdef CONFIG_PM | ||
624 | static void zeus_power_off(void) | 625 | static void zeus_power_off(void) |
625 | { | 626 | { |
626 | local_irq_disable(); | 627 | local_irq_disable(); |
627 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); | 628 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); |
628 | } | 629 | } |
630 | #else | ||
631 | #define zeus_power_off NULL | ||
632 | #endif | ||
629 | 633 | ||
630 | #ifdef CONFIG_APM_EMULATION | 634 | #ifdef CONFIG_APM_EMULATION |
631 | static void zeus_get_power_status(struct apm_power_info *info) | 635 | static void zeus_get_power_status(struct apm_power_info *info) |