aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2016-11-04 18:54:10 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-06 22:00:15 -0500
commit0eebedc2fd284e145fe054a87254b112f9b5ada4 (patch)
tree50d89b094ae31b73b2a05338a4200ca339eed396
parentb89cbfb01a2855b5c4e2f9121195439ac210d65b (diff)
downloadnet-next-0eebedc2fd284e145fe054a87254b112f9b5ada4.tar.gz
stmmac: dwmac-sti: clean up and rename sti_dwmac_init
Rename sti_dwmac_init to sti_dwmac_set_mode which is a better description for what it really does. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c10
1 files 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 b71888a307ffb5..ac17bff9500e0a 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_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_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_mode(dwmac);
return stmmac_resume(dev);
}