Skip to contentSkip to conversation

net: ethernet: marvell: remove unnecessary platform_set_drvdata()

PATCH Applied Jingoo Han 1 participant 1 message May 7, 2013

Subsystems (4)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 17/36 net: ethernet: marvell: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL.

---
 drivers/net/ethernet/marvell/mv643xx_eth.c |    2 --
 drivers/net/ethernet/marvell/mvneta.c      |    2 --
 drivers/net/ethernet/marvell/pxa168_eth.c  |    1 -
 3 files changed, 0 insertions(+), 5 deletions(-)
drivers/net/ethernet/marvell/mv643xx_eth.c +0 -2
index d0afeea..eaa8c33 100644
@@ -2813,8 +2813,6 @@ static int mv643xx_eth_remove(struct platform_device *pdev)
 
 	free_netdev(mp->dev);
 
-	platform_set_drvdata(pdev, NULL);
-
 	return 0;
 }
 
drivers/net/ethernet/marvell/mvneta.c +0 -2
index c966785..cd0ea20 100644
@@ -2804,8 +2804,6 @@ static int mvneta_remove(struct platform_device *pdev)
 	irq_dispose_mapping(dev->irq);
 	free_netdev(dev);
 
-	platform_set_drvdata(pdev, NULL);
-
 	return 0;
 }
 
drivers/net/ethernet/marvell/pxa168_eth.c +0 -1
index 339bb32..2602cf7 100644
@@ -1602,7 +1602,6 @@ static int pxa168_eth_remove(struct platform_device *pdev)
 	unregister_netdev(dev);
 	cancel_work_sync(&pep->tx_timeout_task);
 	free_netdev(dev);
-	platform_set_drvdata(pdev, NULL);
 	return 0;
 }
 
Signature · 1 line
1.7.2.5