ti_cpsw: Check for disabled child nodes
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Tue, 21 Jun 2016 00:16:31 +0000 (01:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jun 2016 19:12:20 +0000 (15:12 -0400)
Dual MAC devices don't necessarily have both MACs wired up, so ignore
those that are disabled.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c

index 83273288aefc3bcfdbdc6c9a749b19e4e4dcc721..9c924f15cd03d20b21306a04ae50651a1829b423 100644 (file)
@@ -2014,7 +2014,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
        if (ret)
                dev_warn(&pdev->dev, "Doesn't have any child node\n");
 
-       for_each_child_of_node(node, slave_node) {
+       for_each_available_child_of_node(node, slave_node) {
                struct cpsw_slave_data *slave_data = data->slave_data + i;
                const void *mac_addr = NULL;
                int lenp;