Commit b3cde36c authored by Uwe Kleine-König's avatar Uwe Kleine-König

net/fec: postpone unsetting driver data until the hardware is stopped

Reported-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent d1ab1f54
...@@ -1465,8 +1465,6 @@ fec_drv_remove(struct platform_device *pdev) ...@@ -1465,8 +1465,6 @@ fec_drv_remove(struct platform_device *pdev)
struct fec_enet_private *fep = netdev_priv(ndev); struct fec_enet_private *fep = netdev_priv(ndev);
struct resource *r; struct resource *r;
platform_set_drvdata(pdev, NULL);
fec_stop(ndev); fec_stop(ndev);
fec_enet_mii_remove(fep); fec_enet_mii_remove(fep);
clk_disable(fep->clk); clk_disable(fep->clk);
...@@ -1479,6 +1477,8 @@ fec_drv_remove(struct platform_device *pdev) ...@@ -1479,6 +1477,8 @@ fec_drv_remove(struct platform_device *pdev)
BUG_ON(!r); BUG_ON(!r);
release_mem_region(r->start, resource_size(r)); release_mem_region(r->start, resource_size(r));
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment