summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-11-17 20:39:55 (GMT)
committerRafael J. Wysocki <rjw@sisk.pl>2011-11-17 20:39:55 (GMT)
commit88995e809f8a8115f30db24696c9137aad93d570 (patch)
tree4e21d1921b224155d49376bdc88ba25715bbd925 /arch/arm/mach-shmobile
parent8b258cc8ac229aa7d5dcb7cc34cb35d9124498ac (diff)
downloadlinux-88995e809f8a8115f30db24696c9137aad93d570.tar.xz
PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
Fix build regression introduced by commit 056879d2f244001b2888cdc8cf (ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix) by moving the intialization of the A3SP domain to a separate function and providing an empty definition of it for CONFIG_PM unset. Reported-and-tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/pm-sh7372.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index 1ec35eb..f15f07e 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -232,11 +232,23 @@ struct sh7372_pm_domain sh7372_a3sp = {
.no_debug = true,
};
+static void sh7372_a3sp_init(void)
+{
+ /* serial consoles make use of SCIF hardware located in A3SP,
+ * keep such power domain on if "no_console_suspend" is set.
+ */
+ sh7372_a3sp.stay_on = !console_suspend_enabled;
+}
+
struct sh7372_pm_domain sh7372_a3sg = {
.bit_shift = 13,
};
-#endif /* CONFIG_PM */
+#else /* !CONFIG_PM */
+
+static inline void sh7372_a3sp_init(void) {}
+
+#endif /* !CONFIG_PM */
#if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE)
static int sh7372_do_idle_core_standby(unsigned long unused)
@@ -474,10 +486,7 @@ void __init sh7372_pm_init(void)
/* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */
__raw_writel(0, PDNSEL);
- /* serial consoles make use of SCIF hardware located in A3SP,
- * keep such power domain on if "no_console_suspend" is set.
- */
- sh7372_a3sp.stay_on = !console_suspend_enabled;
+ sh7372_a3sp_init();
sh7372_suspend_init();
sh7372_cpuidle_init();