ti_cpsw: Check for disabled child nodes

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>
This commit is contained in:
Ben Hutchings 2016-06-21 01:16:31 +01:00 committed by David S. Miller
parent b95e5928fc
commit 8658aaf253

View 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;