net: ethernet: marvell: remove unnecessary platform_set_drvdata()
Subsystems (4)
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.
Signed-off-by Jingoo Han <[email protected]>
--- 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
@@ -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
@@ -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
@@ -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