aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aeroflex/greth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/aeroflex/greth.c')
-rw-r--r--drivers/net/ethernet/aeroflex/greth.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index 269295403fc4..7ff4b30d55ea 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1565,7 +1565,7 @@ error1:
1565 1565
1566static int greth_of_remove(struct platform_device *of_dev) 1566static int greth_of_remove(struct platform_device *of_dev)
1567{ 1567{
1568 struct net_device *ndev = dev_get_drvdata(&of_dev->dev); 1568 struct net_device *ndev = platform_get_drvdata(of_dev);
1569 struct greth_private *greth = netdev_priv(ndev); 1569 struct greth_private *greth = netdev_priv(ndev);
1570 1570
1571 /* Free descriptor areas */ 1571 /* Free descriptor areas */
@@ -1573,8 +1573,6 @@ static int greth_of_remove(struct platform_device *of_dev)
1573 1573
1574 dma_free_coherent(&of_dev->dev, 1024, greth->tx_bd_base, greth->tx_bd_base_phys); 1574 dma_free_coherent(&of_dev->dev, 1024, greth->tx_bd_base, greth->tx_bd_base_phys);
1575 1575
1576 dev_set_drvdata(&of_dev->dev, NULL);
1577
1578 if (greth->phy) 1576 if (greth->phy)
1579 phy_stop(greth->phy); 1577 phy_stop(greth->phy);
1580 mdiobus_unregister(greth->mdio); 1578 mdiobus_unregister(greth->mdio);