Skip to content

Commit

Permalink
[ARM] pxa: define zeus_power_off() only when CONFIG_PM enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Schmidt authored and Eric Miao committed Mar 1, 2010
1 parent cfab57e commit 98acdbe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-pxa/zeus.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,15 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = {
.udc_command = zeus_udc_command,
};

#ifdef CONFIG_PM
static void zeus_power_off(void)
{
local_irq_disable();
pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
}
#else
#define zeus_power_off NULL
#endif

#ifdef CONFIG_APM_EMULATION
static void zeus_get_power_status(struct apm_power_info *info)
Expand Down

0 comments on commit 98acdbe

Please sign in to comment.