summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2008-05-18 20:47:14 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-18 22:28:49 +0200
commit3ce92a2a7b03dae6b7778e2a5ff52f2042512887 (patch)
treebfb0e307e34dd9791f1984a806ba2c1746cfaaf3 /drivers/ide
parentm68k: Correct jump if not running on HP300 (diff)
downloadlinux-3ce92a2a7b03dae6b7778e2a5ff52f2042512887.tar.xz
linux-3ce92a2a7b03dae6b7778e2a5ff52f2042512887.zip
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 <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/legacy/macide.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c
index 1f527bbf8d96..caa2632dd08e 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;