]> git.karo-electronics.de Git - linux-beck.git/commitdiff
phylib: rename mii_bus::dev to mii_bus::parent
authorLennert Buytenhek <buytenh@wantstofly.org>
Wed, 1 Oct 2008 15:41:33 +0000 (15:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Oct 2008 23:27:49 +0000 (16:27 -0700)
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>
17 files changed:
arch/powerpc/platforms/82xx/ep8248e.c
arch/powerpc/platforms/pasemi/gpio_mdio.c
drivers/net/fec_mpc52xx_phy.c
drivers/net/fs_enet/mii-bitbang.c
drivers/net/fs_enet/mii-fec.c
drivers/net/gianfar_mii.c
drivers/net/macb.c
drivers/net/mv643xx_eth.c
drivers/net/phy/fixed.c
drivers/net/phy/mdio-ofgpio.c
drivers/net/phy/mdio_bus.c
drivers/net/sb1250-mac.c
drivers/net/sh_eth.c
drivers/net/tc35815.c
drivers/net/tg3.c
drivers/net/ucc_geth_mii.c
include/linux/phy.h

index d5770fdf7f0970701c033363f53013caa3e5b45e..0eb6d7f62241a38c43e47853e02183374ab752f2 100644 (file)
@@ -137,7 +137,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
                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);
index ab6955412ba49becbc14e0c4aa536dbb7121ecbd..798c7abe16047359c99fac8d6d5ca82c622e19a6 100644 (file)
@@ -272,7 +272,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
        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);
index f5634447276de067d18d85c386d3dbcf9baab618..2a523308c77e9a50ad9c60500088d921a74db1be 100644 (file)
@@ -127,7 +127,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, const struct of_device_i
        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 */
index be4b72f4f49ae8bfec9c87d4fdc9bdbecc203f39..2774252c235236819309497731abba5a9b883d24 100644 (file)
@@ -203,7 +203,7 @@ static int __devinit fs_enet_mdio_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);
index 695f74cc4398a1ba66933d5130434157866a2ff0..4d89a22317ac908335dd3b9b709e3f5c9e738801 100644 (file)
@@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_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);
index 678f48c691194b6cb8852b6fdf3a7c6688db606f..38895b0e376d6b713eb553608dbf0899b424550b 100644 (file)
@@ -196,7 +196,7 @@ static int gfar_mdio_probe(struct device *dev)
 
        new_bus->irq = pdata->irq;
 
-       new_bus->dev = dev;
+       new_bus->parent = dev;
        dev_set_drvdata(dev, new_bus);
 
        /*
index 84c77f1f9a5cf755a33de626c140cd9c8f73e269..045361fe3d6abedb0a29f0f4a7ed04be7261da4f 100644 (file)
@@ -250,7 +250,7 @@ static int macb_mii_init(struct macb *bp)
        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)
index 372811ade9f5ce3603a56c09a9fce76db80ac85f..63400815448005074f06a462c13609a0193038f5 100644 (file)
@@ -2368,7 +2368,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
                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;
index 4e07956a483b60f62050cfd6c83dfaea5f6eaa9c..1cec8967a089704f553fbd22298d6bd419f980b4 100644 (file)
@@ -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;
index 7edfc0c348355a3b33e513a92c195cce09898e2e..27bd4539d0891fcf721c10c4a096adf7cc684b4f 100644 (file)
@@ -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);
index e7508c10887c2199ff766961aa30015074b5431a..a7211a32bb4a19b4b05f683b3dfdf6705c2156f4 100644 (file)
@@ -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);
 
index ce10cfa1ee5371c48701ca7cf0cd12e5a38e7672..d0ee735590bb0cd2d4593cb7bfabf5ee0d6abc43 100644 (file)
@@ -2378,7 +2378,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
        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;
index 1c370e6aa641d571467c4b4727e009bd8a01fd1c..1b3b7b66ffd8ca7566916bb5a54703bcb1e84b40 100644 (file)
@@ -1140,7 +1140,7 @@ static int sh_mdio_init(struct net_device *ndev, int id)
 
        /* 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 */
index 8487ace9d2e3a8d73a8fedbe32a2447ec9575222..1f2b1f2d73ae9a60ea43e3b380b6a625c04ba27d 100644 (file)
@@ -768,7 +768,7 @@ static int tc_mii_init(struct net_device *dev)
        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;
index 123920759efde3a0ce991fa670ee0c0ab47b68ca..4b8b75bcbde07e2b7b2926b79ced03a41857b09e 100644 (file)
@@ -961,7 +961,7 @@ static int tg3_mdio_init(struct tg3 *tp)
        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;
index 6d9e7ad9fda9369b594ee73965e3967d4a1900e7..75b72fe1f23cf5ad72a57e805d98964e5f1e5ca0 100644 (file)
@@ -187,7 +187,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
 
        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 */
index 5f170f5b1a300a838db72950f8d2781c365f0760..87499bdedc6fd3b4cfea2a4e5f5f46c1db625445 100644 (file)
@@ -99,7 +99,7 @@ struct mii_bus {
         */
        struct mutex mdio_lock;
 
-       struct device *dev;
+       struct device *parent;
 
        /* list of all PHYs on bus */
        struct phy_device *phy_map[PHY_MAX_ADDR];