From: Uwe Kleine-König Date: Tue, 25 Jan 2011 17:03:37 +0000 (+0100) Subject: net/fec: postpone unsetting driver data until the hardware is stopped X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b3cde36cf1e19f696cb302ea426b5cf6ab4afb8a;p=openwrt%2Fstaging%2Fblogic.git net/fec: postpone unsetting driver data until the hardware is stopped Reported-by: Lothar Waßmann Signed-off-by: Uwe Kleine-König --- 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; }