bus->irq[i] = -1;
bus->name = "ep8248e-mdio-bitbang";
- bus->dev = &ofdev->dev;
+ bus->parent = &ofdev->dev;
snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
return mdiobus_register(bus);
prop = of_get_property(np, "mdio-pin", NULL);
priv->mdio_pin = *prop;
- new_bus->dev = dev;
+ new_bus->parent = dev;
dev_set_drvdata(dev, new_bus);
err = mdiobus_register(new_bus);
snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
bus->priv = priv;
- bus->dev = dev;
+ bus->parent = dev;
dev_set_drvdata(dev, bus);
/* set MII speed */
if (!strcmp(np->type, "ethernet-phy"))
add_phy(new_bus, np);
- new_bus->dev = &ofdev->dev;
+ new_bus->parent = &ofdev->dev;
dev_set_drvdata(&ofdev->dev, new_bus);
ret = mdiobus_register(new_bus);
if (!strcmp(np->type, "ethernet-phy"))
add_phy(new_bus, np);
- new_bus->dev = &ofdev->dev;
+ new_bus->parent = &ofdev->dev;
dev_set_drvdata(&ofdev->dev, new_bus);
ret = mdiobus_register(new_bus);
new_bus->irq = pdata->irq;
- new_bus->dev = dev;
+ new_bus->parent = dev;
dev_set_drvdata(dev, new_bus);
/*
bp->mii_bus.reset = &macb_mdio_reset;
snprintf(bp->mii_bus.id, MII_BUS_ID_SIZE, "%x", bp->pdev->id);
bp->mii_bus.priv = bp;
- bp->mii_bus.dev = &bp->dev->dev;
+ bp->mii_bus.parent = &bp->dev->dev;
pdata = bp->pdev->dev.platform_data;
if (pdata)
msp->smi_bus.read = smi_bus_read;
msp->smi_bus.write = smi_bus_write,
snprintf(msp->smi_bus.id, MII_BUS_ID_SIZE, "%d", pdev->id);
- msp->smi_bus.dev = &pdev->dev;
+ msp->smi_bus.parent = &pdev->dev;
msp->smi_bus.phy_mask = 0xffffffff;
if (mdiobus_register(&msp->smi_bus) < 0)
goto out_unmap;
snprintf(fmb->mii_bus.id, MII_BUS_ID_SIZE, "0");
fmb->mii_bus.name = "Fixed MDIO Bus";
- fmb->mii_bus.dev = &pdev->dev;
+ fmb->mii_bus.parent = &pdev->dev;
fmb->mii_bus.read = &fixed_mdio_read;
fmb->mii_bus.write = &fixed_mdio_write;
fmb->mii_bus.irq = fmb->irqs;
if (!strcmp(np->type, "ethernet-phy"))
add_phy(new_bus, np);
- new_bus->dev = &ofdev->dev;
+ new_bus->parent = &ofdev->dev;
dev_set_drvdata(&ofdev->dev, new_bus);
ret = mdiobus_register(new_bus);
phydev->irq = bus->irq != NULL ? bus->irq[addr] : PHY_POLL;
- phydev->dev.parent = bus->dev;
+ phydev->dev.parent = bus->parent;
phydev->dev.bus = &mdio_bus_type;
snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, addr);
for (i = 0; i < PHY_MAX_ADDR; ++i)
sc->mii_bus.irq[i] = SBMAC_PHY_INT;
- sc->mii_bus.dev = &pldev->dev;
+ sc->mii_bus.parent = &pldev->dev;
dev_set_drvdata(&pldev->dev, &sc->mii_bus);
return 0;
/* Hook up MII support for ethtool */
mdp->mii_bus->name = "sh_mii";
- mdp->mii_bus->dev = &ndev->dev;
+ mdp->mii_bus->parent = &ndev->dev;
mdp->mii_bus->id[0] = id;
/* PHY IRQ */
snprintf(lp->mii_bus.id, MII_BUS_ID_SIZE, "%x",
(lp->pci_dev->bus->number << 8) | lp->pci_dev->devfn);
lp->mii_bus.priv = dev;
- lp->mii_bus.dev = &lp->pci_dev->dev;
+ lp->mii_bus.parent = &lp->pci_dev->dev;
lp->mii_bus.irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
if (!lp->mii_bus.irq) {
err = -ENOMEM;
snprintf(mdio_bus->id, MII_BUS_ID_SIZE, "%x",
(tp->pdev->bus->number << 8) | tp->pdev->devfn);
mdio_bus->priv = tp;
- mdio_bus->dev = &tp->pdev->dev;
+ mdio_bus->parent = &tp->pdev->dev;
mdio_bus->read = &tg3_mdio_read;
mdio_bus->write = &tg3_mdio_write;
mdio_bus->reset = &tg3_mdio_reset;
new_bus->priv = (void __force *)regs;
- new_bus->dev = device;
+ new_bus->parent = device;
dev_set_drvdata(device, new_bus);
/* Read MII management master from device tree */
*/
struct mutex mdio_lock;
- struct device *dev;
+ struct device *parent;
/* list of all PHYs on bus */
struct phy_device *phy_map[PHY_MAX_ADDR];