diff mbox

[4/4] ARM: imx6: do not call imx6q_suspend_init() with !CONFIG_SUSPEND

Message ID 1393422280-22283-4-git-send-email-shawn.guo@linaro.org
State Accepted
Commit 110666dc655a142bc693ffa61de8eef82c0a8a98
Headers show

Commit Message

Shawn Guo Feb. 26, 2014, 1:44 p.m. UTC
When CONFIG_SUSPEND is not enabled, we should reasonably skip the call
to imx6q_suspend_init().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/mach-imx/pm-imx6q.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
index 2473ad4..16f0d24 100644
--- a/arch/arm/mach-imx/pm-imx6q.c
+++ b/arch/arm/mach-imx/pm-imx6q.c
@@ -516,10 +516,12 @@  static void __init imx6_pm_common_init(const struct imx6_pm_socdata
 
 	WARN_ON(!ccm_base);
 
-	ret = imx6q_suspend_init(socdata);
-	if (ret)
-		pr_warn("%s: No DDR LPM support with suspend %d!\n",
-			__func__, ret);
+	if (IS_ENABLED(CONFIG_SUSPEND)) {
+		ret = imx6q_suspend_init(socdata);
+		if (ret)
+			pr_warn("%s: No DDR LPM support with suspend %d!\n",
+				__func__, ret);
+	}
 
 	/*
 	 * This is for SW workaround step #1 of ERR007265, see comments