summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMugunthan V N2013-12-02 08:23:39 +0100
committerDavid S. Miller2013-12-02 22:55:30 +0100
commit3a27bfac17fe375539c4e0a53478679645eb5ae2 (patch)
treee43849454715baa752f69abbe2e0fb956f70ec4b /drivers/net
parentPCI / tg3: Give up chip reset and carrier loss handling if PCI device is not ... (diff)
downloadkernel-qcow2-linux-3a27bfac17fe375539c4e0a53478679645eb5ae2.tar.gz
kernel-qcow2-linux-3a27bfac17fe375539c4e0a53478679645eb5ae2.tar.xz
kernel-qcow2-linux-3a27bfac17fe375539c4e0a53478679645eb5ae2.zip
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7536a4c01293..a91f0c9d4511 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1816,6 +1816,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
i++;
+ if (i == data->slaves)
+ break;
}
return 0;