aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2016-05-01 16:58:19 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-03 15:22:19 -0400
commitf4e7bd81b1630018952187e5bd731755a6536a61 (patch)
tree0d6ad37794a5d6c351ff2e90fe85186aa23b5a0c /drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
parente03179fe78d5b39dbf3e8b0b50f7c406514b15c7 (diff)
stmmac: let remove/resume/suspend functions take device pointer
Change stmmac_remove/resume/suspend to take a device pointer so they can be used directly by drivers that doesn't need to perform anything device specific. This lets us remove the PCI pm functions and later simplifiy the platform drivers. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Tested-by: Marek Vasut <marex@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index effaa4ff5ab7..409db913b117 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -386,7 +386,7 @@ int stmmac_pltfr_remove(struct platform_device *pdev)
386{ 386{
387 struct net_device *ndev = platform_get_drvdata(pdev); 387 struct net_device *ndev = platform_get_drvdata(pdev);
388 struct stmmac_priv *priv = netdev_priv(ndev); 388 struct stmmac_priv *priv = netdev_priv(ndev);
389 int ret = stmmac_dvr_remove(ndev); 389 int ret = stmmac_dvr_remove(&pdev->dev);
390 390
391 if (priv->plat->exit) 391 if (priv->plat->exit)
392 priv->plat->exit(pdev, priv->plat->bsp_priv); 392 priv->plat->exit(pdev, priv->plat->bsp_priv);
@@ -410,7 +410,7 @@ static int stmmac_pltfr_suspend(struct device *dev)
410 struct stmmac_priv *priv = netdev_priv(ndev); 410 struct stmmac_priv *priv = netdev_priv(ndev);
411 struct platform_device *pdev = to_platform_device(dev); 411 struct platform_device *pdev = to_platform_device(dev);
412 412
413 ret = stmmac_suspend(ndev); 413 ret = stmmac_suspend(dev);
414 if (priv->plat->exit) 414 if (priv->plat->exit)
415 priv->plat->exit(pdev, priv->plat->bsp_priv); 415 priv->plat->exit(pdev, priv->plat->bsp_priv);
416 416
@@ -433,7 +433,7 @@ static int stmmac_pltfr_resume(struct device *dev)
433 if (priv->plat->init) 433 if (priv->plat->init)
434 priv->plat->init(pdev, priv->plat->bsp_priv); 434 priv->plat->init(pdev, priv->plat->bsp_priv);
435 435
436 return stmmac_resume(ndev); 436 return stmmac_resume(dev);
437} 437}
438#endif /* CONFIG_PM_SLEEP */ 438#endif /* CONFIG_PM_SLEEP */
439 439