netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joachim Eastwood <manabian@gmail.com>
To: davem@davemloft.net
Cc: Joachim Eastwood <manabian@gmail.com>,
	marex@denx.de, dinguyen@opensource.altera.com,
	peppe.cavallaro@st.com, alexandre.torgue@st.com,
	netdev@vger.kernel.org
Subject: [net-next PATCH v2 5/5] stmmac: dwmac-socfpga: kill init() and rename setup() to set_phy_mode()
Date: Sun,  1 May 2016 22:58:23 +0200	[thread overview]
Message-ID: <1462136303-16825-6-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1462136303-16825-1-git-send-email-manabian@gmail.com>

Remove old init callback which now contains only a call to
socfpga_dwmac_setup(). Also rename socfpga_dwmac_setup() to indicate
what the function really does.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Tested-by: Marek Vasut <marex@denx.de>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index ba49d8c..cd9764a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -136,7 +136,7 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
 	return 0;
 }
 
-static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac)
+static int socfpga_dwmac_set_phy_mode(struct socfpga_dwmac *dwmac)
 {
 	struct regmap *sys_mgr_base_addr = dwmac->sys_mgr_base_addr;
 	int phymode = dwmac->interface;
@@ -195,16 +195,6 @@ static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac)
 	return 0;
 }
 
-static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
-{
-	struct socfpga_dwmac *dwmac = priv;
-
-	/* Setup the phy mode in the system manager registers according to
-	 * devicetree configuration
-	 */
-	return socfpga_dwmac_setup(dwmac);
-}
-
 static int socfpga_dwmac_probe(struct platform_device *pdev)
 {
 	struct plat_stmmacenet_data *plat_dat;
@@ -245,7 +235,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
 		 */
 		dwmac->stmmac_rst = stpriv->stmmac_rst;
 
-		ret = socfpga_dwmac_init(pdev, dwmac);
+		ret = socfpga_dwmac_set_phy_mode(dwmac);
 	}
 
 	return ret;
@@ -254,11 +244,10 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
 #ifdef CONFIG_PM_SLEEP
 static int socfpga_dwmac_resume(struct device *dev)
 {
-	struct platform_device *pdev = to_platform_device(dev);
 	struct net_device *ndev = dev_get_drvdata(dev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
 
-	socfpga_dwmac_init(pdev, priv->plat->bsp_priv);
+	socfpga_dwmac_set_phy_mode(priv->plat->bsp_priv);
 
 	/* Before the enet controller is suspended, the phy is suspended.
 	 * This causes the phy clock to be gated. The enet controller is
-- 
2.8.0

  parent reply	other threads:[~2016-05-01 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-01 20:58 [net-next PATCH v2 0/5] stmmac: dwmac-socfpga refactor+cleanup Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 1/5] stmmac: let remove/resume/suspend functions take device pointer Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 2/5] stmmac: dwmac-socfpga: add PM ops and resume function Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 3/5] stmmac: dwmac-socfpga: keep a copy of stmmac_rst in driver priv data Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 4/5] stmmac: dwmac-socfpga: call phy_resume() only in resume callback Joachim Eastwood
2016-05-01 20:58 ` Joachim Eastwood [this message]
2016-05-03 19:22 ` [net-next PATCH v2 0/5] stmmac: dwmac-socfpga refactor+cleanup 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=1462136303-16825-6-git-send-email-manabian@gmail.com \
    --to=manabian@gmail.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=dinguyen@opensource.altera.com \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /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).