Commit cb7d78d0 authored by Ivan Khoronzhuk's avatar Ivan Khoronzhuk Committed by David S. Miller

net: ethernet: ti: cpsw: use same macros to get active slave

Use the same, more convenient macros, to get active slave.
Signed-off-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e85663b
...@@ -1624,10 +1624,7 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv) ...@@ -1624,10 +1624,7 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv)
struct cpsw_common *cpsw = priv->cpsw; struct cpsw_common *cpsw = priv->cpsw;
u32 ctrl, mtype; u32 ctrl, mtype;
if (cpsw->data.dual_emac) slave = &cpsw->slaves[cpsw_slave_index(cpsw, priv)];
slave = &cpsw->slaves[priv->emac_port];
else
slave = &cpsw->slaves[cpsw->data.active_slave];
ctrl = slave_read(slave, CPSW2_CONTROL); ctrl = slave_read(slave, CPSW2_CONTROL);
switch (cpsw->version) { switch (cpsw->version) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment