summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mdio_bus.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-11 10:47:54 +0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-11 10:47:54 +0400
commit2bf69b5fe90b3246ab50064c5a690a363e8c53e2 (patch)
treefcae64d1ea5670ca8cb33d5711e181708927e883 /drivers/net/phy/mdio_bus.c
parent67c4f3fa25502ce7ed82fb0307e09cf36f1f81da (diff)
downloadlinux-2bf69b5fe90b3246ab50064c5a690a363e8c53e2.tar.xz
phy subsystem: more cleanups
- unexport symbols never used outside of home module - remove dead code - remove CONFIG_PHYCONTROL, make it unconditionally enabled
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r--drivers/net/phy/mdio_bus.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 5fbea6acfe80..d5a05be28818 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -38,80 +38,6 @@
#include <asm/irq.h>
#include <asm/uaccess.h>
-/* mdiobus_register
- *
- * description: Called by a bus driver to bring up all the PHYs
- * on a given bus, and attach them to the bus
- */
-int mdiobus_register(struct mii_bus *bus)
-{
- int i;
- int err = 0;
-
- spin_lock_init(&bus->mdio_lock);
-
- if (NULL == bus || NULL == bus->name ||
- NULL == bus->read ||
- NULL == bus->write)
- return -EINVAL;
-
- if (bus->reset)
- bus->reset(bus);
-
- for (i = 0; i < PHY_MAX_ADDR; i++) {
- struct phy_device *phydev;
-
- phydev = get_phy_device(bus, i);
-
- if (IS_ERR(phydev))
- return PTR_ERR(phydev);
-
- /* There's a PHY at this address
- * We need to set:
- * 1) IRQ
- * 2) bus_id
- * 3) parent
- * 4) bus
- * 5) mii_bus
- * And, we need to register it */
- if (phydev) {
- phydev->irq = bus->irq[i];
-
- phydev->dev.parent = bus->dev;
- phydev->dev.bus = &mdio_bus_type;
- sprintf(phydev->dev.bus_id, "phy%d:%d", bus->id, i);
-
- phydev->bus = bus;
-
- err = device_register(&phydev->dev);
-
- if (err)
- printk(KERN_ERR "phy %d failed to register\n",
- i);
- }
-
- bus->phy_map[i] = phydev;
- }
-
- pr_info("%s: probed\n", bus->name);
-
- return err;
-}
-EXPORT_SYMBOL(mdiobus_register);
-
-void mdiobus_unregister(struct mii_bus *bus)
-{
- int i;
-
- for (i = 0; i < PHY_MAX_ADDR; i++) {
- if (bus->phy_map[i]) {
- device_unregister(&bus->phy_map[i]->dev);
- kfree(bus->phy_map[i]);
- }
- }
-}
-EXPORT_SYMBOL(mdiobus_unregister);
-
/* mdio_bus_match
*
* description: Given a PHY device, and a PHY driver, return 1 if