Thread (6 messages) 6 messages, 3 authors, 2009-11-05
STALE6049d

[PATCH 1/3] powerpc/fsl: Make fsl_deep_sleep() usable w/ modules and non-83xx builds

From: Anton Vorontsov <hidden>
Date: 2009-09-23 18:52:40
Subsystem: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded ppc8xx and ppc83xx, the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Christophe Leroy, Linus Torvalds

Export is needed for modular builds, and a static inline stub is needed
for non-MPC83xx builds.

Signed-off-by: Anton Vorontsov <redacted>
---
 arch/powerpc/platforms/83xx/suspend.c |    1 +
 include/linux/fsl_devices.h           |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 08e65fc..d306f07 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -96,6 +96,7 @@ int fsl_deep_sleep(void)
 {
 	return deep_sleeping;
 }
+EXPORT_SYMBOL(fsl_deep_sleep);
 
 static int mpc83xx_change_state(void)
 {
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 39fd946..47188d5 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -90,6 +90,10 @@ struct mpc8xx_pcmcia_ops {
  * lead to a deep sleep (i.e. power removed from the core,
  * instead of just the clock).
  */
+#if defined(CONFIG_PPC_83xx) && defined(CONFIG_SUSPEND)
 int fsl_deep_sleep(void);
+#else
+static inline int fsl_deep_sleep(void) { return 0; }
+#endif
 
 #endif /* _FSL_DEVICE_H_ */
-- 
1.6.3.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help