aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio-bitbang.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@marvell.com>2008-10-08 19:29:57 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-08 19:29:57 -0400
commit298cf9beb9679522de995e249eccbd82f7c51999 (patch)
treecabbc9c696a063982aea9a24d8caa667daa33a1a /drivers/net/phy/mdio-bitbang.c
parent18ee49ddb0d242ed1d0e273038d5e4f6de7379d3 (diff)
phylib: move to dynamic allocation of struct mii_bus
This patch introduces mdiobus_alloc() and mdiobus_free(), and makes all mdio bus drivers use these functions to allocate their struct mii_bus'es dynamically. 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/net/phy/mdio-bitbang.c')
-rw-r--r--drivers/net/phy/mdio-bitbang.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c
index c01b78013ddc..2576055b350b 100644
--- a/drivers/net/phy/mdio-bitbang.c
+++ b/drivers/net/phy/mdio-bitbang.c
@@ -165,7 +165,7 @@ struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl)
165{ 165{
166 struct mii_bus *bus; 166 struct mii_bus *bus;
167 167
168 bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); 168 bus = mdiobus_alloc();
169 if (!bus) 169 if (!bus)
170 return NULL; 170 return NULL;
171 171
@@ -184,7 +184,7 @@ void free_mdio_bitbang(struct mii_bus *bus)
184 struct mdiobb_ctrl *ctrl = bus->priv; 184 struct mdiobb_ctrl *ctrl = bus->priv;
185 185
186 module_put(ctrl->ops->owner); 186 module_put(ctrl->ops->owner);
187 kfree(bus); 187 mdiobus_free(bus);
188} 188}
189EXPORT_SYMBOL(free_mdio_bitbang); 189EXPORT_SYMBOL(free_mdio_bitbang);
190 190