From 8658aaf2539795e0b58fe101ae61d989f81700ff Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 21 Jun 2016 01:16:31 +0100 Subject: [PATCH] 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 83273288aefc..9c924f15cd03 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -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; -- 2.20.1