Skip to content

Commit

Permalink
ARM i.MX27 pm: return gracefully on different socs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sascha Hauer committed Nov 24, 2010
1 parent 92fcdc9 commit 76586d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-imx/pm-imx27.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 76586d3

Please sign in to comment.