Skip to contentSkip to conversation

ARM: highbank: call highbank_pm_init from .init_machine

PATCH New Rob Herring 2 participants 2 messages Sep 17, 2012 – Sep 21, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: highbank: call highbank_pm_init from .init_machine

From: Rob Herring <[email protected]>

Being a module_init call, highbank_pm_init will cause problem with multi-platform build running on other platforms. Call it from .init_machine instead.

---
Arnd, Olof,

Can you please apply this to the multi-platform branch or I can send an updated pull request if you prefer.

Rob

 arch/arm/mach-highbank/core.h     |    6 ++++++
 arch/arm/mach-highbank/highbank.c |    1 +
 arch/arm/mach-highbank/pm.c       |    4 +---
 3 files changed, 8 insertions(+), 3 deletions(-)
arch/arm/mach-highbank/core.h +6 -0
index 141ed51..8b9fb1a 100644
@@ -8,4 +8,10 @@ extern void highbank_lluart_map_io(void);
 static inline void highbank_lluart_map_io(void) {}
 #endif
 
+#ifdef CONFIG_PM_SLEEP
+extern void highbank_pm_init(void);
+#else
+static inline void highbank_pm_init(void) {}
+#endif
+
 extern void highbank_smc1(int fn, int arg);
arch/arm/mach-highbank/highbank.c +1 -0
index d75b0a7..f376c26 100644
@@ -152,6 +152,7 @@ static void highbank_power_off(void)
 static void __init highbank_init(void)
 {
 	pm_power_off = highbank_power_off;
+	highbank_pm_init();
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
arch/arm/mach-highbank/pm.c +1 -3
index 33b3beb..de866f2 100644
@@ -47,9 +47,7 @@ static const struct platform_suspend_ops highbank_pm_ops = {
 	.valid = suspend_valid_only_mem,
 };
 
-static int __init highbank_pm_init(void)
+void __init highbank_pm_init(void)
 {
 	suspend_set_ops(&highbank_pm_ops);
-	return 0;
 }
-module_init(highbank_pm_init);
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: highbank: call highbank_pm_init from .init_machine

Quoted 6 lines · Rob Herring

From: Rob Herring <[email protected]>

Being a module_init call, highbank_pm_init will cause problem with multi-platform build running on other platforms. Call it from .init_machine instead.

Quoted 8 lines

---
Arnd, Olof,

Can you please apply this to the multi-platform branch or I can send an updated pull request if you prefer.

Applied.

-Olof