aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorUwe Kleine-König2011-01-25 18:03:37 +0100
committerUwe Kleine-König2011-02-15 09:26:31 +0100
commitb3cde36cf1e19f696cb302ea426b5cf6ab4afb8a (patch)
tree797635767410827b172259fd5b77729ea3180085 /drivers
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')
-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)
struct fec_enet_private *fep = netdev_priv(ndev);
struct resource *r;
- platform_set_drvdata(pdev, NULL);
-
fec_stop(ndev);
fec_enet_mii_remove(fep);
clk_disable(fep->clk);
@@ -1479,6 +1477,8 @@ fec_drv_remove(struct platform_device *pdev)
BUG_ON(!r);
release_mem_region(r->start, resource_size(r));
+ platform_set_drvdata(pdev, NULL);
+
return 0;
}