[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1332323515-7314-5-git-send-email-geert@linux-m68k.org>
Date: Wed, 21 Mar 2012 10:51:49 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: linux-m68k@...ts.linux-m68k.org
Cc: linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 05/11] m68k/atari: Add missing platform check before registering platform devices
On multi-platform kernels, the Atari platform devices should be registered
when running on Atari only. Else it may crash later.
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
arch/m68k/atari/config.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index af78731..35fb81d 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -693,6 +693,9 @@ static struct platform_device *atari_platform_devices[] __initdata = {
int __init atari_platform_init(void)
{
+ if (!MACH_IS_ATARI)
+ return -ENODEV;
+
return platform_add_devices(atari_platform_devices, ARRAY_SIZE(atari_platform_devices));
}
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists