linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
To: mugunthanvnm@ti.com, grygorii.strashko@ti.com
Cc: linux-omap@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Subject: [PATCH 1/5] net: ethernet: ti: cpsw: use same macros to get active slave
Date: Sat, 10 Dec 2016 14:23:46 +0200	[thread overview]
Message-ID: <1481372630-14914-2-git-send-email-ivan.khoronzhuk@linaro.org> (raw)
In-Reply-To: <1481372630-14914-1-git-send-email-ivan.khoronzhuk@linaro.org>

Use the same, more convenient macros, to get active slave.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
 drivers/net/ethernet/ti/cpsw.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index b62d958..c45f7d2 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) {
-- 
2.7.4

  reply	other threads:[~2016-12-10 12:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-10 12:23 [PATCH 1/5] net: ethernet: ti: cpsw: improve re-split policy Ivan Khoronzhuk
2016-12-10 12:23 ` Ivan Khoronzhuk [this message]
2016-12-10 12:23 ` [PATCH 2/5] net: ethernet: ti: cpsw: don't start queue twice Ivan Khoronzhuk
2016-12-10 22:30   ` David Miller
2016-12-10 12:23 ` [PATCH 3/5] net: ethernet: ti: cpsw: combine budget and weight split and check Ivan Khoronzhuk
2016-12-10 22:30   ` David Miller
2016-12-10 12:23 ` [PATCH 4/5] net: ethernet: ti: cpsw: re-split res only when speed is changed Ivan Khoronzhuk
2016-12-10 22:30   ` David Miller
2016-12-10 12:23 ` [PATCH 5/5] net: ethernet: ti: cpsw: sync rates for channels in dual emac mode Ivan Khoronzhuk
2016-12-10 22:30   ` David Miller
2016-12-10 22:30 ` [PATCH 1/5] net: ethernet: ti: cpsw: improve re-split policy David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1481372630-14914-2-git-send-email-ivan.khoronzhuk@linaro.org \
    --to=ivan.khoronzhuk@linaro.org \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).