]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
m68k: macide doesnt check for Mac
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 18 May 2008 18:47:14 +0000 (20:47 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 18 May 2008 20:28:49 +0000 (13:28 -0700)
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>
drivers/ide/legacy/macide.c

index 1f527bbf8d96f9ebb34637223bce6bb07a8db82b..caa2632dd08e1f96d5e5e4379b23ea9ea8cc3563 100644 (file)
@@ -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;