From: Timur Tabi Date: Tue, 14 Aug 2012 13:20:24 +0000 (+0000) Subject: netdev/phy: skip disabled mdio-mux nodes X-Git-Tag: upstream/snapshot3+hdmi~6792^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61abcb7b058853900a3092f2c21988a444e3aaea;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git netdev/phy: skip disabled mdio-mux nodes 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 5c12018..4d4d25e 100644 --- a/drivers/net/phy/mdio-mux.c +++ b/drivers/net/phy/mdio-mux.c @@ -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);