Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c56c5648 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: set hwif->dev in ide_init_port_hw() (take 2)



* Add 'parent' field to hw_regs_t for optional parent device pointer (needed
  by macio PMAC IDE controllers) and set hwif->dev in ide_init_port_hw().

* Update au1xxx-ide.c, sgiioc4.c, pmac.c and setup-pci.c accordingly.

v2:

* Update scc_pata.c.

There should be no functional changes caused by this patch.

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 63b51c6d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -297,7 +297,8 @@ void ide_init_port_hw(ide_hwif_t *hwif, hw_regs_t *hw)
	memcpy(&hwif->io_ports, &hw->io_ports, sizeof(hwif->io_ports));
	hwif->irq = hw->irq;
	hwif->chipset = hw->chipset;
	hwif->gendev.parent = hw->dev;
	hwif->dev = hw->dev;
	hwif->gendev.parent = hw->parent ? hw->parent : hw->dev;
	hwif->ack_intr = hw->ack_intr;
}
EXPORT_SYMBOL_GPL(ide_init_port_hw);
+0 −2
Original line number Diff line number Diff line
@@ -600,8 +600,6 @@ static int au_ide_probe(struct device *dev)

	ide_init_port_hw(hwif, &hw);

	hwif->dev = dev;

	/* If the user has selected DDMA assisted copies,
	   then set up a few local I/O function entry points 
	*/
+0 −1
Original line number Diff line number Diff line
@@ -572,7 +572,6 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
	hw.dev = &dev->dev;
	hw.chipset = ide_pci;
	ide_init_port_hw(hwif, &hw);
	hwif->dev = &dev->dev;

	idx[0] = hwif->index;

+0 −2
Original line number Diff line number Diff line
@@ -625,8 +625,6 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
	hw.dev = &dev->dev;
	ide_init_port_hw(hwif, &hw);

	hwif->dev = &dev->dev;

	/* The IOC4 uses MMIO rather than Port IO. */
	default_hwif_mmiops(hwif);

+2 −4
Original line number Diff line number Diff line
@@ -1148,8 +1148,6 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
	base = ioremap(macio_resource_start(mdev, 0), 0x400);
	regbase = (unsigned long) base;

	hwif->dev = &mdev->bus->pdev->dev;

	pmif->mdev = mdev;
	pmif->node = mdev->ofdev.node;
	pmif->regbase = regbase;
@@ -1171,7 +1169,8 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
	memset(&hw, 0, sizeof(hw));
	pmac_ide_init_ports(&hw, pmif->regbase);
	hw.irq = irq;
	hw.dev = &mdev->ofdev.dev;
	hw.dev = &mdev->bus->pdev->dev;
	hw.parent = &mdev->ofdev.dev;

	rc = pmac_ide_setup_device(pmif, hwif, &hw);
	if (rc != 0) {
@@ -1271,7 +1270,6 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
		goto out_free_pmif;
	}

	hwif->dev = &pdev->dev;
	pmif->mdev = NULL;
	pmif->node = np;

Loading