summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-03 10:07:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-03 10:07:13 -0700
commit1e649afde3708012daf43ff91730595e30e6f3bb (patch)
tree3b3a9e873621e7729cc64f36465ffa3cf116c11c /arch
parent7d6e1cb7aed231b58acd71bdbe67fc03221373e4 (diff)
parent450aed725c9a53282483c48ebd012feefae94a07 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k fixes from Geert Uytterhoeven: "Here are a few fixes for the m68k architecture. Nothing fancy this time, just a build fix for the asm/system.h disintegration, and two fixes for missing platform checks (one got in during last merge window), which can cause crashes in multi-platform kernels." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/q40: Add missing platform check before registering platform devices m68k/mac: Add missing platform check before registering platform devices m68k: include asm/cmpxchg.h in our m68k atomic.h
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/include/asm/atomic.h1
-rw-r--r--arch/m68k/mac/config.c3
-rw-r--r--arch/m68k/q40/config.c3
3 files changed, 7 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/atomic.h b/arch/m68k/include/asm/atomic.h
index 336e6173794f..f4e32de263a7 100644
--- a/arch/m68k/include/asm/atomic.h
+++ b/arch/m68k/include/asm/atomic.h
@@ -3,6 +3,7 @@
#include <linux/types.h>
#include <linux/irqflags.h>
+#include <asm/cmpxchg.h>
/*
* Atomic operations that C can't guarantee us. Useful for
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
*/
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
index 512adb64f7dd..8a1ce327c963 100644
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -334,6 +334,9 @@ static __init int q40_add_kbd_device(void)
{
struct platform_device *pdev;
+ if (!MACH_IS_Q40)
+ return -ENODEV;
+
pdev = platform_device_register_simple("q40kbd", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);