netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] net: sfc: remove unnecessary pci_set_drvdata()
@ 2013-12-09  3:24 Jingoo Han
  2013-12-09  3:25 ` [PATCH 2/5] net: sis900: " Jingoo Han
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Jingoo Han @ 2013-12-09  3:24 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, 'Jingoo Han', linux-net-drivers,
	'Ben Hutchings'

The driver core clears the driver data to NULL after device_release
or on probe failure. 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/sfc/efx.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 958d8c7..12f60e7 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2643,7 +2643,6 @@ static void efx_pci_remove(struct pci_dev *pci_dev)
 	netif_dbg(efx, drv, efx->net_dev, "shutdown successful\n");
 
 	efx_fini_struct(efx);
-	pci_set_drvdata(pci_dev, NULL);
 	free_netdev(efx->net_dev);
 
 	pci_disable_pcie_error_reporting(pci_dev);
@@ -2837,7 +2836,6 @@ static int efx_pci_probe(struct pci_dev *pci_dev,
  fail2:
 	efx_fini_struct(efx);
  fail1:
-	pci_set_drvdata(pci_dev, NULL);
 	WARN_ON(rc > 0);
 	netif_dbg(efx, drv, efx->net_dev, "initialisation failed. rc=%d\n", rc);
 	free_netdev(net_dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH 1/5] net: sfc: remove unnecessary pci_set_drvdata()
@ 2013-11-25  1:43 Jingoo Han
  2013-11-25  1:46 ` [PATCH 4/5] net: ns83820: " Jingoo Han
  0 siblings, 1 reply; 11+ messages in thread
From: Jingoo Han @ 2013-11-25  1:43 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, 'Jingoo Han', linux-net-drivers,
	'Ben Hutchings'

The driver core clears the driver data to NULL after device_release
or on probe failure. 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/sfc/efx.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 2e27837..ad6b811 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2641,7 +2641,6 @@ static void efx_pci_remove(struct pci_dev *pci_dev)
 	netif_dbg(efx, drv, efx->net_dev, "shutdown successful\n");
 
 	efx_fini_struct(efx);
-	pci_set_drvdata(pci_dev, NULL);
 	free_netdev(efx->net_dev);
 
 	pci_disable_pcie_error_reporting(pci_dev);
@@ -2835,7 +2834,6 @@ static int efx_pci_probe(struct pci_dev *pci_dev,
  fail2:
 	efx_fini_struct(efx);
  fail1:
-	pci_set_drvdata(pci_dev, NULL);
 	WARN_ON(rc > 0);
 	netif_dbg(efx, drv, efx->net_dev, "initialisation failed. rc=%d\n", rc);
 	free_netdev(net_dev);
-- 
1.7.10.4

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

end of thread, other threads:[~2013-12-09 23:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09  3:24 [PATCH 1/5] net: sfc: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-09  3:25 ` [PATCH 2/5] net: sis900: " Jingoo Han
2013-12-09 23:09   ` David Miller
2013-12-09  3:26 ` [PATCH 3/5] net: bna: " Jingoo Han
2013-12-09 23:09   ` David Miller
2013-12-09  3:27 ` [PATCH 4/5] net: ns83820: " Jingoo Han
2013-12-09 23:10   ` David Miller
2013-12-09  3:27 ` [PATCH 5/5] net: forcedeth: " Jingoo Han
2013-12-09 23:10   ` David Miller
2013-12-09 23:09 ` [PATCH 1/5] net: sfc: " David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-11-25  1:43 Jingoo Han
2013-11-25  1:46 ` [PATCH 4/5] net: ns83820: " Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).