diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-03-18 13:20:27 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-04-01 22:57:53 +0200 |
commit | 450aed725c9a53282483c48ebd012feefae94a07 (patch) | |
tree | 2cbd5e664c0f66490294a641033cf361820a3564 | |
parent | 6cfeba53911d6d2f17ebbd1246893557d5ff5aeb (diff) |
m68k/q40: Add missing platform check before registering platform devices
On multi-platform kernels, the Q40/Q60 platform devices should be
registered when running on Q40/Q60 only. Else it may crash later.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r-- | arch/m68k/q40/config.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |