Skip to content

Commit

Permalink
m68k: macide doesnt check for Mac
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
geertu authored and torvalds committed May 18, 2008
1 parent 3f365e8 commit 3ce92a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/ide/legacy/macide.c
Expand Up @@ -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;
Expand Down

0 comments on commit 3ce92a2

Please sign in to comment.