From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joachim Eastwood Subject: [net-next PATCH 6/7] stmmac: dwmac-sti: clean up and rename sti_dwmac_init Date: Sun, 30 Oct 2016 21:05:06 +0100 Message-ID: <20161030200507.851-7-manabian@gmail.com> References: <20161030200507.851-1-manabian@gmail.com> Cc: Joachim Eastwood , peppe.cavallaro@st.com, alexandre.torgue@st.com, netdev@vger.kernel.org To: davem@davemloft.net Return-path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:35085 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757338AbcJ3UGj (ORCPT ); Sun, 30 Oct 2016 16:06:39 -0400 Received: by mail-lf0-f67.google.com with SMTP id p100so1691707lfg.2 for ; Sun, 30 Oct 2016 13:06:39 -0700 (PDT) In-Reply-To: <20161030200507.851-1-manabian@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Rename sti_dwmac_init to sti_dwmac_set_phy_mode which is a better description for what it really does. Signed-off-by: Joachim Eastwood --- drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c index aa75a27..0af3faa 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c @@ -229,9 +229,8 @@ static void stid127_fix_retime_src(void *priv, u32 spd) regmap_update_bits(dwmac->regmap, reg, STID127_RETIME_SRC_MASK, val); } -static int sti_dwmac_init(struct platform_device *pdev, void *priv) +static int sti_dwmac_set_phy_mode(struct sti_dwmac *dwmac) { - struct sti_dwmac *dwmac = priv; struct regmap *regmap = dwmac->regmap; int iface = dwmac->interface; u32 reg = dwmac->ctrl_reg; @@ -245,7 +244,7 @@ static int sti_dwmac_init(struct platform_device *pdev, void *priv) val = (iface == PHY_INTERFACE_MODE_REVMII) ? 0 : ENMII; regmap_update_bits(regmap, reg, ENMII_MASK, val); - dwmac->fix_retime_src(priv, dwmac->speed); + dwmac->fix_retime_src(dwmac, dwmac->speed); return 0; } @@ -350,7 +349,7 @@ static int sti_dwmac_probe(struct platform_device *pdev) if (ret) return ret; - ret = sti_dwmac_init(pdev, plat_dat->bsp_priv); + ret = sti_dwmac_set_phy_mode(dwmac); if (ret) goto disable_clk; @@ -389,10 +388,9 @@ static int sti_dwmac_suspend(struct device *dev) static int sti_dwmac_resume(struct device *dev) { struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev); - struct platform_device *pdev = to_platform_device(dev); clk_prepare_enable(dwmac->clk); - sti_dwmac_init(pdev, dwmac); + sti_dwmac_set_phy_mode(dwmac); return stmmac_resume(dev); } -- 2.10.1