diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-11-04 18:09:18 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-11-24 04:09:02 -0500 |
commit | 76586d35eb31192bf3f395c2e02cef8a57e3558c (patch) | |
tree | d75a6e6fe2d7b74de9634fcff8f16a57e41e84e2 | |
parent | 92fcdc9d1054a630f224657dc675e03bf3bb62ed (diff) |
ARM i.MX27 pm: return gracefully on different socs
Code called from an initcall can be maybe called for
machines it's not intended for. So check for valid
machines and return gracefully if an incompatible machine
is found.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-imx/pm-imx27.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c index afc17ce0bb54..6bf81ceea137 100644 --- a/arch/arm/mach-imx/pm-imx27.c +++ b/arch/arm/mach-imx/pm-imx27.c | |||
@@ -39,6 +39,9 @@ static struct platform_suspend_ops mx27_suspend_ops = { | |||
39 | 39 | ||
40 | static int __init mx27_pm_init(void) | 40 | static int __init mx27_pm_init(void) |
41 | { | 41 | { |
42 | if (!cpu_is_mx27()) | ||
43 | return 0; | ||
44 | |||
42 | suspend_set_ops(&mx27_suspend_ops); | 45 | suspend_set_ops(&mx27_suspend_ops); |
43 | return 0; | 46 | return 0; |
44 | } | 47 | } |