netdev/phy: skip disabled mdio-mux nodes
authorTimur Tabi <timur@freescale.com>
Tue, 14 Aug 2012 13:20:24 +0000 (13:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Aug 2012 09:16:00 +0000 (02:16 -0700)
The mdio-mux driver scans all child mdio nodes, without regard to whether
the node is actually used.  Some device trees include all possible
mdio-mux nodes and rely on the boot loader to disable those that are not
present, based on some run-time configuration.  Those nodes need to be
skipped.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-mux.c

index 5c120189ec86d419866b7320c36f4d618dc5df64..4d4d25efc1e10a2b87e3c8ab993ae3ba6167a7dd 100644 (file)
@@ -132,7 +132,7 @@ int mdio_mux_init(struct device *dev,
        pb->mii_bus = parent_bus;
 
        ret_val = -ENODEV;
-       for_each_child_of_node(dev->of_node, child_bus_node) {
+       for_each_available_child_of_node(dev->of_node, child_bus_node) {
                u32 v;
 
                r = of_property_read_u32(child_bus_node, "reg", &v);