From: Geert Uytterhoeven Date: Sun, 18 May 2008 18:47:14 +0000 (+0200) Subject: m68k: macide doesnt check for Mac X-Git-Tag: v2.6.26-rc3~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ce92a2a7b03dae6b7778e2a5ff52f2042512887;p=platform%2Fkernel%2Flinux-3.10.git m68k: macide doesnt check for Mac The Macintosh IDE driver (macide) doesn't check whether it's actually running on Mac hardware, causing a crash if it isn't. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index 1f527bb..caa2632 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c @@ -95,6 +95,9 @@ static int __init macide_init(void) int irq; hw_regs_t hw; + if (!MACH_IS_MAC) + return -ENODEV; + switch (macintosh_config->ide_type) { case MAC_IDE_QUADRA: base = IDE_BASE;