diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-01-06 20:11:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-07 14:31:26 -0500 |
commit | 7f854420fbfe9d49afe2ffb1df052cfe8e215541 (patch) | |
tree | 1f3c8d932976b597cdb6db3e53b06b4a95c5d303 /drivers/of | |
parent | 801a8ef54e8b21eb6699aaa88681259dafb1d1b5 (diff) | |
download | linux-7f854420fbfe9d49afe2ffb1df052cfe8e215541.tar.bz2 |
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>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/of_mdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index c0292051392e..6febe2df76f9 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -193,7 +193,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) for (addr = 0; addr < PHY_MAX_ADDR; addr++) { /* skip already registered PHYs */ - if (mdio->phy_map[addr]) + if (mdiobus_is_registered_device(mdio, addr)) continue; /* be noisy to encourage people to set reg property */ |