瀏覽代碼

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>
Sascha Hauer 14 年之前
父節點
當前提交
76586d35eb
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      arch/arm/mach-imx/pm-imx27.c

+ 3 - 0
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;
 }