Skip to content

Commit

Permalink
[PATCH] powerpc: Fix ide-pmac sysfs entry
Browse files Browse the repository at this point in the history
It looks like the generic ide code now wants ide_init_hwif_ports() to set
the parent struct device into the ide_hw structure (new field ?).  Without
this, the mac ide code can cause the ide probing code to explode in flames
in sysfs registration due to what looks like a stale pointer in there
(happens when removing/re-inserting one of the hotswap media bays on some
laptops).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed May 21, 2006
1 parent c44b20d commit 22192cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/ide/ppc/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ pmac_ide_init_hwif_ports(hw_regs_t *hw,

if (irq != NULL)
*irq = pmac_ide[ix].irq;

hw->dev = &pmac_ide[ix].mdev->ofdev.dev;
}

#define PMAC_IDE_REG(x) ((void __iomem *)(IDE_DATA_REG+(x)))
Expand Down

0 comments on commit 22192cc

Please sign in to comment.