From: Ben Hutchings Date: Tue, 21 Jun 2016 00:16:31 +0000 (+0100) Subject: ti_cpsw: Check for disabled child nodes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8658aaf2539795e0b58fe101ae61d989f81700ff;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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;