Skip to content

Commit 8658aaf

Browse files
bwh-ctdavem330
authored andcommitted
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>
1 parent b95e592 commit 8658aaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ti/cpsw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2014,7 +2014,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
20142014
if (ret)
20152015
dev_warn(&pdev->dev, "Doesn't have any child node\n");
20162016

2017-
for_each_child_of_node(node, slave_node) {
2017+
for_each_available_child_of_node(node, slave_node) {
20182018
struct cpsw_slave_data *slave_data = data->slave_data + i;
20192019
const void *mac_addr = NULL;
20202020
int lenp;

0 commit comments

Comments
 (0)