From 76586d35eb31192bf3f395c2e02cef8a57e3558c Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Nov 2010 23:09:18 +0100 Subject: [PATCH] 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 --- arch/arm/mach-imx/pm-imx27.c | 3 +++ 1 file changed, 3 insertions(+) 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 = { static int __init mx27_pm_init(void) { + if (!cpu_is_mx27()) + return 0; + suspend_set_ops(&mx27_suspend_ops); return 0; } -- 2.20.1