diff options
author | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> | 2016-12-10 14:23:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-10 17:29:47 -0500 |
commit | cb7d78d045579831fbf40112f93bf2064a7ef14f (patch) | |
tree | 5357e2b7a877ec04a71568d68b262c914594daf3 /drivers/net/ethernet/ti/cpsw.c | |
parent | 0e85663b887aa7c87d64965952fbf436c209fbe4 (diff) |
net: ethernet: ti: cpsw: use same macros to get active slave
Use the same, more convenient macros, to get active slave.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.c')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index b62d958c5fae..c45f7d2100df 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1624,10 +1624,7 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv) struct cpsw_common *cpsw = priv->cpsw; u32 ctrl, mtype; - if (cpsw->data.dual_emac) - slave = &cpsw->slaves[priv->emac_port]; - else - slave = &cpsw->slaves[cpsw->data.active_slave]; + slave = &cpsw->slaves[cpsw_slave_index(cpsw, priv)]; ctrl = slave_read(slave, CPSW2_CONTROL); switch (cpsw->version) { |