summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2012-03-18 13:21:38 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2012-04-01 22:57:51 +0200
commit6cfeba53911d6d2f17ebbd1246893557d5ff5aeb (patch)
treeec74c829f11b9fe5b4fa5c35cffd61f83454ad22
parentm68k: include asm/cmpxchg.h in our m68k atomic.h (diff)
downloadlinux-6cfeba53911d6d2f17ebbd1246893557d5ff5aeb.tar.xz
linux-6cfeba53911d6d2f17ebbd1246893557d5ff5aeb.zip
m68k/mac: Add missing platform check before registering platform devices
On multi-platform kernels, the Mac platform devices should be registered when running on Mac only. Else it may crash later. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: stable@vger.kernel.org
-rw-r--r--arch/m68k/mac/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 96fa6ed7e799..d9f62e0f46c0 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -980,6 +980,9 @@ int __init mac_platform_init(void)
{
u8 *swim_base;
+ if (!MACH_IS_MAC)
+ return -ENODEV;
+
/*
* Serial devices
*/