diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2015-03-11 00:57:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-11 22:56:28 +0100 |
commit | 33d6737761ea425d43f3b6e4561573a4020982f2 (patch) | |
tree | be03975d5adacb5c523a1c428c806a7b91e1a0dd /drivers/of/of_mdio.c | |
parent | net: bcmgenet: collect Rx discarded packet count (diff) | |
download | linux-33d6737761ea425d43f3b6e4561573a4020982f2.tar.xz linux-33d6737761ea425d43f3b6e4561573a4020982f2.zip |
of: mdio: export of_mdio_parse_addr
Export of_mdio_parse_addr() which allows parsing a given Ethernet PHY
node MDIO address, verify it is within the allowed range, and return
its value. This is going to be useful for the DSA code which needs to
deal with multiple layers of MDIO buses.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r-- | drivers/of/of_mdio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 1bd43053b8c7..0c064485d1c2 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -88,7 +88,7 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi return 0; } -static int of_mdio_parse_addr(struct device *dev, const struct device_node *np) +int of_mdio_parse_addr(struct device *dev, const struct device_node *np) { u32 addr; int ret; @@ -108,6 +108,7 @@ static int of_mdio_parse_addr(struct device *dev, const struct device_node *np) return addr; } +EXPORT_SYMBOL(of_mdio_parse_addr); /** * of_mdiobus_register - Register mii_bus and create PHYs from the device tree |