drivers: net: cpsw: fix dt probe for one port ethernet

When only one port of the two port is pinned out, then dt probe is failing
because second port phy is not found. fixing this by checking the number of
slaves and breaking the loop.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Mugunthan V N 2013-12-02 12:53:39 +05:30 committed by David S. Miller
parent 8496e85c20
commit 3a27bfac17
1 changed files with 2 additions and 0 deletions

View File

@ -1816,6 +1816,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
i++;
if (i == data->slaves)
break;
}
return 0;