Thread (2 messages) read the whole thread 2 messages, 2 authors, 2016-02-02
DORMANTno replies

[PATCH] ARM: mx25: Add basic suspend/resume support

From: arnd@arndb.de (Arnd Bergmann)
Date: 2016-02-02 21:34:22

On Tuesday 02 February 2016 19:18:06 Fabio Estevam wrote:
+#ifdef CONFIG_PM
+static int imx25_suspend_enter(suspend_state_t state)
+{
+       switch (state) {
+       case PM_SUSPEND_MEM:
+               cpu_do_idle();
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       return 0;
+}
+#else
+static inline int imx25_suspend_enter(suspend_state_t state)
+{
+       return 0;
+}
+#endif
Better remove the #ifdef by doing

void __init imx25_pm_init(void)
{
	if (IS_ENABLED(CONFIG_PM))
		suspend_set_ops(&imx25_suspend_ops);
}

or put the IS_ENABLED() check inside of imx25_suspend_enter().

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help