All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: psci: Fix build breakage without PM_SLEEP
@ 2014-12-09 11:48 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2014-12-09 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

Fix build failure of defconfig when PM_SLEEP is disabled (e.g. by
disabling SUSPEND) and CPU_IDLE enabled:

arch/arm64/kernel/psci.c:543:2: error: unknown field ?cpu_suspend? specified in initializer
  .cpu_suspend = cpu_psci_cpu_suspend,
  ^
arch/arm64/kernel/psci.c:543:2: warning: initialization from incompatible pointer type [enabled by default]
arch/arm64/kernel/psci.c:543:2: warning: (near initialization for ?cpu_psci_ops.cpu_prepare?) [enabled by default]
make[1]: *** [arch/arm64/kernel/psci.o] Error 1

The cpu_operations.cpu_suspend field exists only if ARM64_CPU_SUSPEND is
defined, not CPU_IDLE.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 arch/arm64/kernel/psci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 3425f311c49e..f1dbca7d5c96 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -540,6 +540,8 @@ const struct cpu_operations cpu_psci_ops = {
 	.name		= "psci",
 #ifdef CONFIG_CPU_IDLE
 	.cpu_init_idle	= cpu_psci_cpu_init_idle,
+#endif
+#ifdef CONFIG_ARM64_CPU_SUSPEND
 	.cpu_suspend	= cpu_psci_cpu_suspend,
 #endif
 #ifdef CONFIG_SMP
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-12-15 18:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 11:48 [PATCH] arm64: psci: Fix build breakage without PM_SLEEP Krzysztof Kozlowski
2014-12-09 11:48 ` Krzysztof Kozlowski
2014-12-09 12:29 ` Arnd Bergmann
2014-12-09 12:29   ` Arnd Bergmann
2014-12-09 12:38   ` Krzysztof Kozlowski
2014-12-09 12:38     ` Krzysztof Kozlowski
2014-12-09 16:15     ` Catalin Marinas
2014-12-09 16:15       ` Catalin Marinas
2014-12-12 15:06       ` Lorenzo Pieralisi
2014-12-12 15:06         ` Lorenzo Pieralisi
2014-12-15 17:46         ` Catalin Marinas
2014-12-15 17:46           ` Catalin Marinas
2014-12-15 18:32           ` Lorenzo Pieralisi
2014-12-15 18:32             ` Lorenzo Pieralisi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.