mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: stmmac: dwmac-rk: turn exit into standard driver remove callback
Convert the exit hook into a standard driver remove function as
the hook doesn't really buy us anything extra.
Eventually the exit hook will be deprecated in favor of the driver
remove function.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0de8c4c9a9)
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I1f8cf997b136b17be9c7e227f57008ffaab6bf1f
This commit is contained in:
committed by
David Wu
parent
1c10516b3e
commit
ba8f5ed39f
@@ -1038,13 +1038,6 @@ static int rk_gmac_init(struct platform_device *pdev, void *priv)
|
||||
return rk_gmac_powerup(bsp_priv);
|
||||
}
|
||||
|
||||
static void rk_gmac_exit(struct platform_device *pdev, void *priv)
|
||||
{
|
||||
struct rk_priv_data *bsp_priv = priv;
|
||||
|
||||
rk_gmac_powerdown(bsp_priv);
|
||||
}
|
||||
|
||||
static void rk_fix_speed(void *priv, unsigned int speed)
|
||||
{
|
||||
struct rk_priv_data *bsp_priv = priv;
|
||||
@@ -1122,7 +1115,6 @@ static int rk_gmac_probe(struct platform_device *pdev)
|
||||
|
||||
plat_dat->has_gmac = true;
|
||||
plat_dat->init = rk_gmac_init;
|
||||
plat_dat->exit = rk_gmac_exit;
|
||||
plat_dat->fix_mac_speed = rk_fix_speed;
|
||||
plat_dat->get_eth_addr = rk_get_eth_addr;
|
||||
|
||||
@@ -1137,6 +1129,16 @@ static int rk_gmac_probe(struct platform_device *pdev)
|
||||
return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
|
||||
}
|
||||
|
||||
static int rk_gmac_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev);
|
||||
int ret = stmmac_dvr_remove(&pdev->dev);
|
||||
|
||||
rk_gmac_powerdown(bsp_priv);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int rk_gmac_suspend(struct device *dev)
|
||||
{
|
||||
@@ -1181,7 +1183,7 @@ MODULE_DEVICE_TABLE(of, rk_gmac_dwmac_match);
|
||||
|
||||
static struct platform_driver rk_gmac_dwmac_driver = {
|
||||
.probe = rk_gmac_probe,
|
||||
.remove = stmmac_pltfr_remove,
|
||||
.remove = rk_gmac_remove,
|
||||
.driver = {
|
||||
.name = "rk_gmac-dwmac",
|
||||
.pm = &rk_gmac_pm_ops,
|
||||
|
||||
Reference in New Issue
Block a user