aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fec.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-01-25 12:03:37 -0500
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-02-15 03:26:31 -0500
commitb3cde36cf1e19f696cb302ea426b5cf6ab4afb8a (patch)
tree797635767410827b172259fd5b77729ea3180085 /drivers/net/fec.c
parentd1ab1f54a1b0fb0ae6479fad6e26983f09fd263a (diff)
net/fec: postpone unsetting driver data until the hardware is stopped
Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/net/fec.c')
-rw-r--r--drivers/net/fec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 0c984d6b25f6..c3229713b1e2 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1465,8 +1465,6 @@ fec_drv_remove(struct platform_device *pdev)
1465 struct fec_enet_private *fep = netdev_priv(ndev); 1465 struct fec_enet_private *fep = netdev_priv(ndev);
1466 struct resource *r; 1466 struct resource *r;
1467 1467
1468 platform_set_drvdata(pdev, NULL);
1469
1470 fec_stop(ndev); 1468 fec_stop(ndev);
1471 fec_enet_mii_remove(fep); 1469 fec_enet_mii_remove(fep);
1472 clk_disable(fep->clk); 1470 clk_disable(fep->clk);
@@ -1479,6 +1477,8 @@ fec_drv_remove(struct platform_device *pdev)
1479 BUG_ON(!r); 1477 BUG_ON(!r);
1480 release_mem_region(r->start, resource_size(r)); 1478 release_mem_region(r->start, resource_size(r));
1481 1479
1480 platform_set_drvdata(pdev, NULL);
1481
1482 return 0; 1482 return 0;
1483} 1483}
1484 1484