phy: Add API for {un}registering an mdio device to a bus.
Rather than have drivers directly manipulate the mii_bus structure, provide and API for registering and unregistering devices on an MDIO bus, and performing lookups. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
801a8ef54e
commit
7f854420fb
@@ -393,7 +393,7 @@ static int davinci_mdio_probe(struct platform_device *pdev)
|
||||
|
||||
/* scan and dump the bus */
|
||||
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
||||
phy = data->bus->phy_map[addr];
|
||||
phy = mdiobus_get_phy(data->bus, addr);
|
||||
if (phy) {
|
||||
dev_info(dev, "phy[%d]: device %s, driver %s\n",
|
||||
phy->mdio.addr, phydev_name(phy),
|
||||
|
Reference in New Issue
Block a user