Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+14 -5
+14 -5
arch/arm/mach-shmobile/pm-sh7372.c
··· 232 232 .no_debug = true, 233 233 }; 234 234 235 + static void sh7372_a3sp_init(void) 236 + { 237 + /* serial consoles make use of SCIF hardware located in A3SP, 238 + * keep such power domain on if "no_console_suspend" is set. 239 + */ 240 + sh7372_a3sp.stay_on = !console_suspend_enabled; 241 + } 242 + 235 243 struct sh7372_pm_domain sh7372_a3sg = { 236 244 .bit_shift = 13, 237 245 }; 238 246 239 - #endif /* CONFIG_PM */ 247 + #else /* !CONFIG_PM */ 248 + 249 + static inline void sh7372_a3sp_init(void) {} 250 + 251 + #endif /* !CONFIG_PM */ 240 252 241 253 #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) 242 254 static int sh7372_do_idle_core_standby(unsigned long unused) ··· 486 474 /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */ 487 475 __raw_writel(0, PDNSEL); 488 476 489 - /* serial consoles make use of SCIF hardware located in A3SP, 490 - * keep such power domain on if "no_console_suspend" is set. 491 - */ 492 - sh7372_a3sp.stay_on = !console_suspend_enabled; 477 + sh7372_a3sp_init(); 493 478 494 479 sh7372_suspend_init(); 495 480 sh7372_cpuidle_init();