[PATCH 1/4] net: cpsw: Pass correct slave

Sascha Hauer s.hauer at pengutronix.de
Wed May 14 23:56:53 PDT 2014


Pass the current slave to cpsw_slave_init/cpsw_update_link,
not the first one.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/net/cpsw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index ec3263d..f11b2d9 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -801,8 +801,8 @@ static int cpsw_open(struct eth_device *edev)
 			   ALE_SECURE);
 	cpsw_ale_add_mcast(priv, ethbdaddr, 1 << priv->host_port);
 
-	cpsw_slave_init(&priv->slaves[0], priv);
-	cpsw_update_link(&priv->slaves[0], priv);
+	cpsw_slave_init(slave, priv);
+	cpsw_update_link(slave, priv);
 
 	/* init descriptor pool */
 	for (i = 0; i < NUM_DESCS; i++) {
-- 
2.0.0.rc0




More information about the barebox mailing list