All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 28/36] net: ethernet: ti: remove unnecessary platform_set_drvdata()
@ 2013-05-07  4:53 Jingoo Han
  2013-05-07  5:30 ` Mugunthan V N
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-05-07  4:53 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, Jingoo Han, 'Mugunthan V N',
	'Sekhar Nori',
	Wei Yongjun

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 <jg1.han@samsung.com>
---
 drivers/net/ethernet/ti/cpsw.c         |    1 -
 drivers/net/ethernet/ti/davinci_emac.c |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 21a5b29..89a4c40 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1940,7 +1940,6 @@ static int cpsw_remove(struct platform_device *pdev)
 	struct cpsw_priv *priv = netdev_priv(ndev);
 	int i;
 
-	platform_set_drvdata(pdev, NULL);
 	if (priv->data.dual_emac)
 		unregister_netdev(cpsw_get_slave_ndev(priv, 1));
 	unregister_netdev(ndev);
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 860e15d..efb6f65 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -2037,8 +2037,6 @@ static int davinci_emac_remove(struct platform_device *pdev)
 
 	dev_notice(&ndev->dev, "DaVinci EMAC: davinci_emac_remove()\n");
 
-	platform_set_drvdata(pdev, NULL);
-
 	if (priv->txchan)
 		cpdma_chan_destroy(priv->txchan);
 	if (priv->rxchan)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 28/36] net: ethernet: ti: remove unnecessary platform_set_drvdata()
  2013-05-07  4:53 [PATCH 28/36] net: ethernet: ti: remove unnecessary platform_set_drvdata() Jingoo Han
@ 2013-05-07  5:30 ` Mugunthan V N
  0 siblings, 0 replies; 2+ messages in thread
From: Mugunthan V N @ 2013-05-07  5:30 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'David S. Miller', netdev, 'Sekhar Nori', Wei Yongjun

On 5/7/2013 10:23 AM, Jingoo Han wrote:
> 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<jg1.han@samsung.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-07  5:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07  4:53 [PATCH 28/36] net: ethernet: ti: remove unnecessary platform_set_drvdata() Jingoo Han
2013-05-07  5:30 ` Mugunthan V N

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.