Patchwork ARM: mxs: Fix mxs_pm_init if CONFIG_PM undefined

login
register
mail settings
Submitter Marek Vasut
Date July 1, 2013, 11:36 a.m.
Message ID <1372678590-8765-1-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/256095/
State New
Headers show

Comments

Marek Vasut - July 1, 2013, 11:36 a.m.
In case the CONFIG_PM is not defined, the mxs_pm_init() from pm.c
is not compiled and therefore mxs_pm_init() is not available. Make
sure that the kernel builds even if CONFIG_PM is not defined.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/mach-mxs/pm.h |    4 ++++
 1 file changed, 4 insertions(+)
Fabio Estevam - July 1, 2013, 11:42 a.m.
On Mon, Jul 1, 2013 at 8:36 AM, Marek Vasut <marex@denx.de> wrote:
> In case the CONFIG_PM is not defined, the mxs_pm_init() from pm.c
> is not compiled and therefore mxs_pm_init() is not available. Make
> sure that the kernel builds even if CONFIG_PM is not defined.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>

Arnd has already sent a fix for this:
http://www.spinics.net/lists/arm-kernel/msg254288.html
Marek Vasut - July 1, 2013, 11:45 a.m.
Dear Fabio Estevam,

> On Mon, Jul 1, 2013 at 8:36 AM, Marek Vasut <marex@denx.de> wrote:
> > In case the CONFIG_PM is not defined, the mxs_pm_init() from pm.c
> > is not compiled and therefore mxs_pm_init() is not available. Make
> > sure that the kernel builds even if CONFIG_PM is not defined.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Shawn Guo <shawn.guo@linaro.org>
> 
> Arnd has already sent a fix for this:
> http://www.spinics.net/lists/arm-kernel/msg254288.html

Ok, thanks. Will this hit 3.10 in any subsequent update?

Best regards,
Marek Vasut

Patch

diff --git a/arch/arm/mach-mxs/pm.h b/arch/arm/mach-mxs/pm.h
index f57e7cd..9f1dcf0 100644
--- a/arch/arm/mach-mxs/pm.h
+++ b/arch/arm/mach-mxs/pm.h
@@ -9,6 +9,10 @@ 
 #ifndef __ARCH_MXS_PM_H
 #define __ARCH_MXS_PM_H
 
+#ifdef CONFIG_PM
 void mxs_pm_init(void);
+#else
+static inline void mxs_pm_init(void) {}
+#endif
 
 #endif