From b3cde36cf1e19f696cb302ea426b5cf6ab4afb8a Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 25 Jan 2011 18:03:37 +0100 Subject: net/fec: postpone unsetting driver data until the hardware is stopped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Lothar Waßmann Signed-off-by: Uwe Kleine-König --- drivers/net/fec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/fec.c') 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; } -- cgit v1.2.3