ARM: imx6: do not call imx6q_suspend_init() with !CONFIG_SUSPEND
authorShawn Guo <shawn.guo@linaro.org>
Wed, 26 Feb 2014 13:40:32 +0000 (21:40 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Wed, 5 Mar 2014 02:40:53 +0000 (10:40 +0800)
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

index 2473ad4db819dd66d91b304202a5291c3e5984c6..16f0d249f6a7aa0ef4a7e989f823858961519320 100644 (file)
@@ -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