Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] powerpc: Fix ide-pmac sysfs entry

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>

authored by

Benjamin Herrenschmidt and committed by
Linus Torvalds
22192ccd c44b20d5

+2
+2
drivers/ide/ppc/pmac.c
··· 553 553 554 554 if (irq != NULL) 555 555 *irq = pmac_ide[ix].irq; 556 + 557 + hw->dev = &pmac_ide[ix].mdev->ofdev.dev; 556 558 } 557 559 558 560 #define PMAC_IDE_REG(x) ((void __iomem *)(IDE_DATA_REG+(x)))