mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: stmmac: dwmac-rk: absorb rk_gmac_init into probe
Since the rk_gmac_init() only calls another function move this function call into probe so rk_gmac_init() can be removed. Since commitcecbc5563a("stmmac: allow to split suspend/resume from init/exit callbacks") the init hook is no longer used in dwmac-rk so this can be removed. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit07a5e76924) Signed-off-by: David Wu <david.wu@rock-chips.com> Change-Id: I5c591b38e53d5196e4da5fe144f35bbe675f07ba
This commit is contained in:
committed by
David Wu
parent
ba8f5ed39f
commit
996358dcb5
@@ -1031,13 +1031,6 @@ static void rk_gmac_powerdown(struct rk_priv_data *gmac)
|
||||
gmac_clk_enable(gmac, false);
|
||||
}
|
||||
|
||||
static int rk_gmac_init(struct platform_device *pdev, void *priv)
|
||||
{
|
||||
struct rk_priv_data *bsp_priv = priv;
|
||||
|
||||
return rk_gmac_powerup(bsp_priv);
|
||||
}
|
||||
|
||||
static void rk_fix_speed(void *priv, unsigned int speed)
|
||||
{
|
||||
struct rk_priv_data *bsp_priv = priv;
|
||||
@@ -1114,7 +1107,6 @@ static int rk_gmac_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(plat_dat);
|
||||
|
||||
plat_dat->has_gmac = true;
|
||||
plat_dat->init = rk_gmac_init;
|
||||
plat_dat->fix_mac_speed = rk_fix_speed;
|
||||
plat_dat->get_eth_addr = rk_get_eth_addr;
|
||||
|
||||
@@ -1122,7 +1114,7 @@ static int rk_gmac_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(plat_dat->bsp_priv))
|
||||
return PTR_ERR(plat_dat->bsp_priv);
|
||||
|
||||
ret = rk_gmac_init(pdev, plat_dat->bsp_priv);
|
||||
ret = rk_gmac_powerup(plat_dat->bsp_priv);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user