phylib: rename mii_bus::dev to mii_bus::parent
In preparation of giving mii_bus objects a device tree presence of their own, rename struct mii_bus's ->dev argument to ->parent, since having a 'struct device *dev' that points to our parent device conflicts with introducing a 'struct device dev' representing our own device. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Andy Fleming <afleming@freescale.com>
This commit is contained in:
committed by
David S. Miller
parent
236bb5e649
commit
18ee49ddb0
@@ -215,7 +215,7 @@ static int __init fixed_mdio_bus_init(void)
|
||||
|
||||
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;
|
||||
|
@@ -142,7 +142,7 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
|
||||
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);
|
||||
|
@@ -107,7 +107,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
|
||||
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user