aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar.c')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 2375a01715a0..14f06947e70d 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1000,7 +1000,7 @@ static int gfar_probe(struct platform_device *ofdev)
1000 spin_lock_init(&priv->bflock); 1000 spin_lock_init(&priv->bflock);
1001 INIT_WORK(&priv->reset_task, gfar_reset_task); 1001 INIT_WORK(&priv->reset_task, gfar_reset_task);
1002 1002
1003 dev_set_drvdata(&ofdev->dev, priv); 1003 platform_set_drvdata(ofdev, priv);
1004 regs = priv->gfargrp[0].regs; 1004 regs = priv->gfargrp[0].regs;
1005 1005
1006 gfar_detect_errata(priv); 1006 gfar_detect_errata(priv);
@@ -1240,15 +1240,13 @@ register_fail:
1240 1240
1241static int gfar_remove(struct platform_device *ofdev) 1241static int gfar_remove(struct platform_device *ofdev)
1242{ 1242{
1243 struct gfar_private *priv = dev_get_drvdata(&ofdev->dev); 1243 struct gfar_private *priv = platform_get_drvdata(ofdev);
1244 1244
1245 if (priv->phy_node) 1245 if (priv->phy_node)
1246 of_node_put(priv->phy_node); 1246 of_node_put(priv->phy_node);
1247 if (priv->tbi_node) 1247 if (priv->tbi_node)
1248 of_node_put(priv->tbi_node); 1248 of_node_put(priv->tbi_node);
1249 1249
1250 dev_set_drvdata(&ofdev->dev, NULL);
1251
1252 unregister_netdev(priv->ndev); 1250 unregister_netdev(priv->ndev);
1253 unmap_group_regs(priv); 1251 unmap_group_regs(priv);
1254 free_gfar_dev(priv); 1252 free_gfar_dev(priv);