diff options
author | Lennert Buytenhek <buytenh@marvell.com> | 2008-10-09 12:45:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-09 12:45:04 -0400 |
commit | ec2a5652ea53c102306f08cdf516f98e32bd4b61 (patch) | |
tree | eb4aaee0455d2627556a830e4b491e7bba95bb87 /arch/powerpc | |
parent | 724f88057609c00d6e973c3a7e0eb72f8eec2da9 (diff) |
phylib: two dynamic mii_bus allocation fallout fixes
1. arch/powerpc/platforms/pasemi/gpio_mdio.c also needs to be
converted over to mdiobus_{alloc,free}().
2. drivers/net/phy/fixed.c used to embed a struct mii_bus into its
struct fixed_mdio_bus and then use container_of() to go from the
former to the latter. Since mii bus structures are no longer
embedded, we need to do something like use the mii bus private
pointer to go from mii_bus to fixed_mdio_bus instead.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pasemi/gpio_mdio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index 798c7abe1604..75cc165d5bee 100644 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c | |||
@@ -230,7 +230,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev, | |||
230 | if (!priv) | 230 | if (!priv) |
231 | goto out; | 231 | goto out; |
232 | 232 | ||
233 | new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); | 233 | new_bus = mdiobus_alloc(); |
234 | 234 | ||
235 | if (!new_bus) | 235 | if (!new_bus) |
236 | goto out_free_priv; | 236 | goto out_free_priv; |
@@ -306,7 +306,7 @@ static int gpio_mdio_remove(struct of_device *dev) | |||
306 | 306 | ||
307 | kfree(bus->priv); | 307 | kfree(bus->priv); |
308 | bus->priv = NULL; | 308 | bus->priv = NULL; |
309 | kfree(bus); | 309 | mdiobus_free(bus); |
310 | 310 | ||
311 | return 0; | 311 | return 0; |
312 | } | 312 | } |