aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-highbank
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-09-17 10:55:12 -0400
committerOlof Johansson <olof@lixom.net>2012-09-21 01:58:17 -0400
commita283580c52d3aa24305985e945dfccfbcfc6f4f9 (patch)
tree5f730f0b78b557080c69c214b656a3bd4c65a95a /arch/arm/mach-highbank
parent85594df2bad0dddb36aa8aa242f4d15e6f122f02 (diff)
ARM: highbank: call highbank_pm_init from .init_machine
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. Reported-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-highbank')
-rw-r--r--arch/arm/mach-highbank/core.h6
-rw-r--r--arch/arm/mach-highbank/highbank.c1
-rw-r--r--arch/arm/mach-highbank/pm.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
index 141ed5171826..8b9fb1a46a91 100644
--- a/arch/arm/mach-highbank/core.h
+++ b/arch/arm/mach-highbank/core.h
@@ -8,4 +8,10 @@ extern void highbank_lluart_map_io(void);
8static inline void highbank_lluart_map_io(void) {} 8static inline void highbank_lluart_map_io(void) {}
9#endif 9#endif
10 10
11#ifdef CONFIG_PM_SLEEP
12extern void highbank_pm_init(void);
13#else
14static inline void highbank_pm_init(void) {}
15#endif
16
11extern void highbank_smc1(int fn, int arg); 17extern void highbank_smc1(int fn, int arg);
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index d75b0a78d88a..f376c26cb0e1 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -152,6 +152,7 @@ static void highbank_power_off(void)
152static void __init highbank_init(void) 152static void __init highbank_init(void)
153{ 153{
154 pm_power_off = highbank_power_off; 154 pm_power_off = highbank_power_off;
155 highbank_pm_init();
155 156
156 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 157 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
157} 158}
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
index 33b3beb89982..de866f21331f 100644
--- a/arch/arm/mach-highbank/pm.c
+++ b/arch/arm/mach-highbank/pm.c
@@ -47,9 +47,7 @@ static const struct platform_suspend_ops highbank_pm_ops = {
47 .valid = suspend_valid_only_mem, 47 .valid = suspend_valid_only_mem,
48}; 48};
49 49
50static int __init highbank_pm_init(void) 50void __init highbank_pm_init(void)
51{ 51{
52 suspend_set_ops(&highbank_pm_ops); 52 suspend_set_ops(&highbank_pm_ops);
53 return 0;
54} 53}
55module_init(highbank_pm_init);