diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-10-01 11:41:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 19:27:49 -0400 |
commit | 18ee49ddb0d242ed1d0e273038d5e4f6de7379d3 (patch) | |
tree | 8d935cda154204171628cee535f83a992aa66ef9 /drivers | |
parent | 236bb5e649c2a7e8398b87df5e643368408afb4a (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/fec_mpc52xx_phy.c | 2 | ||||
-rw-r--r-- | drivers/net/fs_enet/mii-bitbang.c | 2 | ||||
-rw-r--r-- | drivers/net/fs_enet/mii-fec.c | 2 | ||||
-rw-r--r-- | drivers/net/gianfar_mii.c | 2 | ||||
-rw-r--r-- | drivers/net/macb.c | 2 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/fixed.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/mdio-ofgpio.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 2 | ||||
-rw-r--r-- | drivers/net/sb1250-mac.c | 2 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/tc35815.c | 2 | ||||
-rw-r--r-- | drivers/net/tg3.c | 2 | ||||
-rw-r--r-- | drivers/net/ucc_geth_mii.c | 2 |
14 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index f5634447276..2a523308c77 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c | |||
@@ -127,7 +127,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, const struct of_device_i | |||
127 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); | 127 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); |
128 | bus->priv = priv; | 128 | bus->priv = priv; |
129 | 129 | ||
130 | bus->dev = dev; | 130 | bus->parent = dev; |
131 | dev_set_drvdata(dev, bus); | 131 | dev_set_drvdata(dev, bus); |
132 | 132 | ||
133 | /* set MII speed */ | 133 | /* set MII speed */ |
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index be4b72f4f49..2774252c235 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c | |||
@@ -203,7 +203,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
203 | if (!strcmp(np->type, "ethernet-phy")) | 203 | if (!strcmp(np->type, "ethernet-phy")) |
204 | add_phy(new_bus, np); | 204 | add_phy(new_bus, np); |
205 | 205 | ||
206 | new_bus->dev = &ofdev->dev; | 206 | new_bus->parent = &ofdev->dev; |
207 | dev_set_drvdata(&ofdev->dev, new_bus); | 207 | dev_set_drvdata(&ofdev->dev, new_bus); |
208 | 208 | ||
209 | ret = mdiobus_register(new_bus); | 209 | ret = mdiobus_register(new_bus); |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 695f74cc439..4d89a22317a 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
172 | if (!strcmp(np->type, "ethernet-phy")) | 172 | if (!strcmp(np->type, "ethernet-phy")) |
173 | add_phy(new_bus, np); | 173 | add_phy(new_bus, np); |
174 | 174 | ||
175 | new_bus->dev = &ofdev->dev; | 175 | new_bus->parent = &ofdev->dev; |
176 | dev_set_drvdata(&ofdev->dev, new_bus); | 176 | dev_set_drvdata(&ofdev->dev, new_bus); |
177 | 177 | ||
178 | ret = mdiobus_register(new_bus); | 178 | ret = mdiobus_register(new_bus); |
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index 678f48c6911..38895b0e376 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -196,7 +196,7 @@ static int gfar_mdio_probe(struct device *dev) | |||
196 | 196 | ||
197 | new_bus->irq = pdata->irq; | 197 | new_bus->irq = pdata->irq; |
198 | 198 | ||
199 | new_bus->dev = dev; | 199 | new_bus->parent = dev; |
200 | dev_set_drvdata(dev, new_bus); | 200 | dev_set_drvdata(dev, new_bus); |
201 | 201 | ||
202 | /* | 202 | /* |
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 84c77f1f9a5..045361fe3d6 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -250,7 +250,7 @@ static int macb_mii_init(struct macb *bp) | |||
250 | bp->mii_bus.reset = &macb_mdio_reset; | 250 | bp->mii_bus.reset = &macb_mdio_reset; |
251 | snprintf(bp->mii_bus.id, MII_BUS_ID_SIZE, "%x", bp->pdev->id); | 251 | snprintf(bp->mii_bus.id, MII_BUS_ID_SIZE, "%x", bp->pdev->id); |
252 | bp->mii_bus.priv = bp; | 252 | bp->mii_bus.priv = bp; |
253 | bp->mii_bus.dev = &bp->dev->dev; | 253 | bp->mii_bus.parent = &bp->dev->dev; |
254 | pdata = bp->pdev->dev.platform_data; | 254 | pdata = bp->pdev->dev.platform_data; |
255 | 255 | ||
256 | if (pdata) | 256 | if (pdata) |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 372811ade9f..63400815448 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -2368,7 +2368,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) | |||
2368 | msp->smi_bus.read = smi_bus_read; | 2368 | msp->smi_bus.read = smi_bus_read; |
2369 | msp->smi_bus.write = smi_bus_write, | 2369 | msp->smi_bus.write = smi_bus_write, |
2370 | snprintf(msp->smi_bus.id, MII_BUS_ID_SIZE, "%d", pdev->id); | 2370 | snprintf(msp->smi_bus.id, MII_BUS_ID_SIZE, "%d", pdev->id); |
2371 | msp->smi_bus.dev = &pdev->dev; | 2371 | msp->smi_bus.parent = &pdev->dev; |
2372 | msp->smi_bus.phy_mask = 0xffffffff; | 2372 | msp->smi_bus.phy_mask = 0xffffffff; |
2373 | if (mdiobus_register(&msp->smi_bus) < 0) | 2373 | if (mdiobus_register(&msp->smi_bus) < 0) |
2374 | goto out_unmap; | 2374 | goto out_unmap; |
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 4e07956a483..1cec8967a08 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c | |||
@@ -215,7 +215,7 @@ static int __init fixed_mdio_bus_init(void) | |||
215 | 215 | ||
216 | snprintf(fmb->mii_bus.id, MII_BUS_ID_SIZE, "0"); | 216 | snprintf(fmb->mii_bus.id, MII_BUS_ID_SIZE, "0"); |
217 | fmb->mii_bus.name = "Fixed MDIO Bus"; | 217 | fmb->mii_bus.name = "Fixed MDIO Bus"; |
218 | fmb->mii_bus.dev = &pdev->dev; | 218 | fmb->mii_bus.parent = &pdev->dev; |
219 | fmb->mii_bus.read = &fixed_mdio_read; | 219 | fmb->mii_bus.read = &fixed_mdio_read; |
220 | fmb->mii_bus.write = &fixed_mdio_write; | 220 | fmb->mii_bus.write = &fixed_mdio_write; |
221 | fmb->mii_bus.irq = fmb->irqs; | 221 | fmb->mii_bus.irq = fmb->irqs; |
diff --git a/drivers/net/phy/mdio-ofgpio.c b/drivers/net/phy/mdio-ofgpio.c index 7edfc0c3483..27bd4539d08 100644 --- a/drivers/net/phy/mdio-ofgpio.c +++ b/drivers/net/phy/mdio-ofgpio.c | |||
@@ -142,7 +142,7 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | |||
142 | if (!strcmp(np->type, "ethernet-phy")) | 142 | if (!strcmp(np->type, "ethernet-phy")) |
143 | add_phy(new_bus, np); | 143 | add_phy(new_bus, np); |
144 | 144 | ||
145 | new_bus->dev = &ofdev->dev; | 145 | new_bus->parent = &ofdev->dev; |
146 | dev_set_drvdata(&ofdev->dev, new_bus); | 146 | dev_set_drvdata(&ofdev->dev, new_bus); |
147 | 147 | ||
148 | ret = mdiobus_register(new_bus); | 148 | ret = mdiobus_register(new_bus); |
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index e7508c10887..a7211a32bb4 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -107,7 +107,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) | |||
107 | 107 | ||
108 | phydev->irq = bus->irq != NULL ? bus->irq[addr] : PHY_POLL; | 108 | phydev->irq = bus->irq != NULL ? bus->irq[addr] : PHY_POLL; |
109 | 109 | ||
110 | phydev->dev.parent = bus->dev; | 110 | phydev->dev.parent = bus->parent; |
111 | phydev->dev.bus = &mdio_bus_type; | 111 | phydev->dev.bus = &mdio_bus_type; |
112 | snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, addr); | 112 | snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, addr); |
113 | 113 | ||
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index ce10cfa1ee5..d0ee735590b 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2378,7 +2378,7 @@ static int sbmac_init(struct platform_device *pldev, long long base) | |||
2378 | for (i = 0; i < PHY_MAX_ADDR; ++i) | 2378 | for (i = 0; i < PHY_MAX_ADDR; ++i) |
2379 | sc->mii_bus.irq[i] = SBMAC_PHY_INT; | 2379 | sc->mii_bus.irq[i] = SBMAC_PHY_INT; |
2380 | 2380 | ||
2381 | sc->mii_bus.dev = &pldev->dev; | 2381 | sc->mii_bus.parent = &pldev->dev; |
2382 | dev_set_drvdata(&pldev->dev, &sc->mii_bus); | 2382 | dev_set_drvdata(&pldev->dev, &sc->mii_bus); |
2383 | 2383 | ||
2384 | return 0; | 2384 | return 0; |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 1c370e6aa64..1b3b7b66ffd 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -1140,7 +1140,7 @@ static int sh_mdio_init(struct net_device *ndev, int id) | |||
1140 | 1140 | ||
1141 | /* Hook up MII support for ethtool */ | 1141 | /* Hook up MII support for ethtool */ |
1142 | mdp->mii_bus->name = "sh_mii"; | 1142 | mdp->mii_bus->name = "sh_mii"; |
1143 | mdp->mii_bus->dev = &ndev->dev; | 1143 | mdp->mii_bus->parent = &ndev->dev; |
1144 | mdp->mii_bus->id[0] = id; | 1144 | mdp->mii_bus->id[0] = id; |
1145 | 1145 | ||
1146 | /* PHY IRQ */ | 1146 | /* PHY IRQ */ |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 8487ace9d2e..1f2b1f2d73a 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -768,7 +768,7 @@ static int tc_mii_init(struct net_device *dev) | |||
768 | snprintf(lp->mii_bus.id, MII_BUS_ID_SIZE, "%x", | 768 | snprintf(lp->mii_bus.id, MII_BUS_ID_SIZE, "%x", |
769 | (lp->pci_dev->bus->number << 8) | lp->pci_dev->devfn); | 769 | (lp->pci_dev->bus->number << 8) | lp->pci_dev->devfn); |
770 | lp->mii_bus.priv = dev; | 770 | lp->mii_bus.priv = dev; |
771 | lp->mii_bus.dev = &lp->pci_dev->dev; | 771 | lp->mii_bus.parent = &lp->pci_dev->dev; |
772 | lp->mii_bus.irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); | 772 | lp->mii_bus.irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); |
773 | if (!lp->mii_bus.irq) { | 773 | if (!lp->mii_bus.irq) { |
774 | err = -ENOMEM; | 774 | err = -ENOMEM; |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 123920759ef..4b8b75bcbde 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -961,7 +961,7 @@ static int tg3_mdio_init(struct tg3 *tp) | |||
961 | snprintf(mdio_bus->id, MII_BUS_ID_SIZE, "%x", | 961 | snprintf(mdio_bus->id, MII_BUS_ID_SIZE, "%x", |
962 | (tp->pdev->bus->number << 8) | tp->pdev->devfn); | 962 | (tp->pdev->bus->number << 8) | tp->pdev->devfn); |
963 | mdio_bus->priv = tp; | 963 | mdio_bus->priv = tp; |
964 | mdio_bus->dev = &tp->pdev->dev; | 964 | mdio_bus->parent = &tp->pdev->dev; |
965 | mdio_bus->read = &tg3_mdio_read; | 965 | mdio_bus->read = &tg3_mdio_read; |
966 | mdio_bus->write = &tg3_mdio_write; | 966 | mdio_bus->write = &tg3_mdio_write; |
967 | mdio_bus->reset = &tg3_mdio_reset; | 967 | mdio_bus->reset = &tg3_mdio_reset; |
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index 6d9e7ad9fda..75b72fe1f23 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c | |||
@@ -187,7 +187,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma | |||
187 | 187 | ||
188 | new_bus->priv = (void __force *)regs; | 188 | new_bus->priv = (void __force *)regs; |
189 | 189 | ||
190 | new_bus->dev = device; | 190 | new_bus->parent = device; |
191 | dev_set_drvdata(device, new_bus); | 191 | dev_set_drvdata(device, new_bus); |
192 | 192 | ||
193 | /* Read MII management master from device tree */ | 193 | /* Read MII management master from device tree */ |