aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netx-eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/netx-eth.c')
-rw-r--r--drivers/net/ethernet/netx-eth.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/netx-eth.c b/drivers/net/ethernet/netx-eth.c
index cb9e63831500..5da3ffb61062 100644
--- a/drivers/net/ethernet/netx-eth.c
+++ b/drivers/net/ethernet/netx-eth.c
@@ -430,11 +430,9 @@ exit:
430 430
431static int netx_eth_drv_remove(struct platform_device *pdev) 431static int netx_eth_drv_remove(struct platform_device *pdev)
432{ 432{
433 struct net_device *ndev = dev_get_drvdata(&pdev->dev); 433 struct net_device *ndev = platform_get_drvdata(pdev);
434 struct netx_eth_priv *priv = netdev_priv(ndev); 434 struct netx_eth_priv *priv = netdev_priv(ndev);
435 435
436 platform_set_drvdata(pdev, NULL);
437
438 unregister_netdev(ndev); 436 unregister_netdev(ndev);
439 xc_stop(priv->xc); 437 xc_stop(priv->xc);
440 free_xc(priv->xc); 438 free_xc(priv->xc);