aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio_bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r--drivers/net/phy/mdio_bus.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index a7211a32bb4a..d206691f15d8 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -36,6 +36,18 @@
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37 37
38/** 38/**
39 * mdiobus_alloc - allocate a mii_bus structure
40 *
41 * Description: called by a bus driver to allocate an mii_bus
42 * structure to fill in.
43 */
44struct mii_bus *mdiobus_alloc(void)
45{
46 return kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
47}
48EXPORT_SYMBOL(mdiobus_alloc);
49
50/**
39 * mdiobus_register - bring up all the PHYs on a given bus and attach them to bus 51 * mdiobus_register - bring up all the PHYs on a given bus and attach them to bus
40 * @bus: target mii_bus 52 * @bus: target mii_bus
41 * 53 *
@@ -87,6 +99,18 @@ void mdiobus_unregister(struct mii_bus *bus)
87} 99}
88EXPORT_SYMBOL(mdiobus_unregister); 100EXPORT_SYMBOL(mdiobus_unregister);
89 101
102/**
103 * mdiobus_free - free a struct mii_bus
104 * @bus: mii_bus to free
105 *
106 * This function frees the mii_bus.
107 */
108void mdiobus_free(struct mii_bus *bus)
109{
110 kfree(bus);
111}
112EXPORT_SYMBOL(mdiobus_free);
113
90struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) 114struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
91{ 115{
92 struct phy_device *phydev; 116 struct phy_device *phydev;