ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-omap2 / omap-mpuss-lowpower.c
index 8bcb64bcdcdb37a5642b387a65fbd9dddc04b5f8..d650f91f15ded052b0eb9c90063a87e1cef98722 100644 (file)
@@ -246,7 +246,10 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
        /*
         * Call low level function  with targeted low power state.
         */
-       cpu_suspend(save_state, omap4_finish_suspend);
+       if (save_state)
+               cpu_suspend(save_state, omap4_finish_suspend);
+       else
+               omap4_finish_suspend(save_state);
 
        /*
         * Restore the CPUx power state to ON otherwise CPUx