Skip to content

Commit

Permalink
OMAP2: PM: fix compile error when !CONFIG_SUSPEND
Browse files Browse the repository at this point in the history
When CONFIG_SUSPEND is not enabled, none of the system PM methods are
used, so do not compile them in.

Thanks to Charles Manning for reporting the problem and proposing
an initial patch.

Reported-by: Charles Manning <manningc2@actrix.gen.nz>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Kevin Hilman authored and Tony Lindgren committed Dec 22, 2010
1 parent 1c46556 commit 05fad3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-omap2/pm24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ static void omap2_pm_idle(void)
local_irq_enable();
}

#ifdef CONFIG_SUSPEND
static int omap2_pm_begin(suspend_state_t state)
{
disable_hlt();
Expand Down Expand Up @@ -355,6 +356,9 @@ static struct platform_suspend_ops omap_pm_ops = {
.end = omap2_pm_end,
.valid = suspend_valid_only_mem,
};
#else
static const struct platform_suspend_ops __initdata omap_pm_ops;
#endif /* CONFIG_SUSPEND */

/* XXX This function should be shareable between OMAP2xxx and OMAP3 */
static int __init clkdms_setup(struct clockdomain *clkdm, void *unused)
Expand Down

0 comments on commit 05fad3e

Please sign in to comment.