summaryrefslogtreecommitdiffstats
path: root/drivers/net/fec.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-01-25 18:03:37 +0100
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-02-15 09:26:31 +0100
commitb3cde36cf1e19f696cb302ea426b5cf6ab4afb8a (patch)
tree797635767410827b172259fd5b77729ea3180085 /drivers/net/fec.c
parentnet/fec: provide device for dma functions and matching sizes for map and unmap (diff)
downloadlinux-b3cde36cf1e19f696cb302ea426b5cf6ab4afb8a.tar.xz
linux-b3cde36cf1e19f696cb302ea426b5cf6ab4afb8a.zip
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 '')
-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;
}