Skip to content

Commit

Permalink
ti_cpsw: Check for disabled child nodes
Browse files Browse the repository at this point in the history
Dual MAC devices don't necessarily have both MACs wired up, so ignore
those that are disabled.

Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
bwh-ct authored and davem330 committed Jun 23, 2016
1 parent b95e592 commit 8658aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8658aaf

Please sign in to comment.