forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
d1ab1f54a1
commit
b3cde36cf1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user