summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.c
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-08-17 15:53:11 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:26 -0800
commit30e24c3a35e0a55d58be3a91400c517ccb57a878 (patch)
tree3d396957b7396c528ff7b9af681a9611d1b7ccc3 /arch/arm/mach-tegra/pm.c
parent95ad04c37e78fe9de4a8c467e187d732a02a6033 (diff)
ARM: tegra: Fix warnings when CONFIG_PM_SLEEP is not selected
Change-Id: If06bd6a9030c8b1502c96459eb6657a6bff4b0fa Signed-off-by: Scott Williams <scwilliams@nvidia.com> Reviewed-on: http://git-master/r/47634 Rebase-Id: R2982ec1b130417178376a06bb37f24aaf65ec19f
Diffstat (limited to 'arch/arm/mach-tegra/pm.c')
-rw-r--r--arch/arm/mach-tegra/pm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index 33fcca25097f..5a53e0705de7 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -883,7 +883,13 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
preset_lpj = loops_per_jiffy;
-#ifdef CONFIG_PM_SLEEP
+#ifndef CONFIG_PM_SLEEP
+ if (plat->suspend_mode != TEGRA_SUSPEND_NONE) {
+ pr_warning("%s: Suspend requires CONFIG_PM_SLEEP -- "
+ "disabling suspend\n", __func__);
+ plat->suspend_mode = TEGRA_SUSPEND_NONE;
+ }
+#else
if (create_suspend_pgtable() < 0) {
pr_err("%s: PGD memory alloc failed -- LP0/LP1/LP2 unavailable\n",
__func__);
@@ -976,14 +982,8 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
}
iram_cpu_lp2_mask = tegra_cpu_lp2_mask;
-#else
- if (plat->suspend_mode != TEGRA_SUSPEND_NONE) {
- pr_warning("%s: Suspend requires CONFIG_PM_SLEEP -- "
- "disabling suspend\n", __func__);
- plat->suspend_mode = TEGRA_SUSPEND_NONE;
- }
-#endif
fail:
+#endif
if (plat->suspend_mode == TEGRA_SUSPEND_NONE)
tegra_lp2_in_idle(false);