wireless: remove unnecessary pci_set_drvdata()
Subsystems (3)
cover wireless: remove unnecessary pci_set_drvdata()
Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound), 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.
--- drivers/net/wireless/adm8211.c | 1 - drivers/net/wireless/airo.c | 1 - drivers/net/wireless/ath/ath10k/pci.c | 2 -- drivers/net/wireless/ath/wil6210/pcie_bus.c | 1 - drivers/net/wireless/ipw2x00/ipw2200.c | 2 -- drivers/net/wireless/iwlegacy/3945-mac.c | 2 -- drivers/net/wireless/iwlegacy/4965-mac.c | 2 -- drivers/net/wireless/iwlwifi/pcie/drv.c | 3 --- drivers/net/wireless/mwl8k.c | 2 -- drivers/net/wireless/orinoco/orinoco_nortel.c | 2 -- drivers/net/wireless/orinoco/orinoco_pci.c | 2 -- drivers/net/wireless/orinoco/orinoco_plx.c | 2 -- drivers/net/wireless/orinoco/orinoco_tmd.c | 2 -- drivers/net/wireless/p54/p54pci.c | 1 - drivers/net/wireless/rtl818x/rtl8180/dev.c | 1 - drivers/net/wireless/rtlwifi/pci.c | 3 --- 16 files changed, 29 deletions(-)
PATCH 1/12 wireless: iwlwifi: remove unnecessary pci_set_drvdata()
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.
--- drivers/net/wireless/iwlwifi/pcie/drv.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/wireless/iwlwifi/pcie/drv.c +0 -3
@@ -349,7 +349,6 @@ out_free_drv:iwl_drv_stop (trans_pcie->drv); out_free_trans:iwl_trans_pcie_free (iwl_trans); -pci_set_drvdata (pdev,NULL );return ret; }
@@ -360,8 +359,6 @@ static void iwl_pci_remove(struct pci_dev *pdev)iwl_drv_stop (trans_pcie->drv);iwl_trans_pcie_free (trans); - -pci_set_drvdata (pdev,NULL ); }#ifdef CONFIG_PM_SLEEP
Signature · 1 line
1.7.10.4
Emmanuel Grumbach
AppliedRe: [PATCH 01/12] wireless: iwlwifi: remove unnecessary pci_set_drvdata()
Quoted 9 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>--- drivers/net/wireless/iwlwifi/pcie/drv.c | 3 --- 1 file changed, 3 deletions(-)
I picked it up - thanks.
PATCH 2/12 wireless: rtlwifi: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/rtlwifi/pci.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/wireless/rtlwifi/pci.c +0 -3
@@ -2009,7 +2009,6 @@ fail2: fail1:if (hw)ieee80211_free_hw (hw); -pci_set_drvdata (pdev,NULL );pci_disable_device (pdev);return err;
@@ -2064,8 +2063,6 @@ void rtl_pci_disconnect(struct pci_dev *pdev)rtl_pci_disable_aspm (hw); -pci_set_drvdata (pdev,NULL ); -ieee80211_free_hw (hw); }EXPORT_SYMBOL (rtl_pci_disconnect);
Signature · 1 line
1.7.10.4
Re: [PATCH 02/12] wireless: rtlwifi: remove unnecessary pci_set_drvdata()
Quoted 23 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>--- drivers/net/wireless/rtlwifi/pci.c | 3 --- 1 file changed, 3 deletions(-)drivers/net/wireless/rtlwifi/pci.c +0
-1@@ -2009,7 +2009,6 @@ fail2: fail1:if (hw)ieee80211_free_hw (hw); -pci_set_drvdata (pdev,NULL );pci_disable_device (pdev);return err;
drivers/net/wireless/rtlwifi/pci.c void rtl_pci_disconnect(struct pci_dev *pdev) · line 2068
Quoted 8 lines
drivers/net/wireless/rtlwifi/pci.c +0
-2@@ -2064,8 +2063,6 @@ void rtl_pci_disconnect(struct pci_dev *pdev)rtl_pci_disable_aspm (hw); -pci_set_drvdata (pdev,NULL ); -ieee80211_free_hw (hw); }EXPORT_SYMBOL (rtl_pci_disconnect);
Thanks,
Larry
PATCH 3/12 wireless: iwlegacy: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/iwlegacy/3945-mac.c | 2 -- drivers/net/wireless/iwlegacy/4965-mac.c | 2 -- 2 files changed, 4 deletions(-)
drivers/net/wireless/iwlegacy/3945-mac.c +0 -2
@@ -3811,7 +3811,6 @@ out_iounmap: out_pci_release_regions:pci_release_regions (pdev); out_pci_disable_device: -pci_set_drvdata (pdev,NULL );pci_disable_device (pdev); out_ieee80211_free_hw:ieee80211_free_hw (il->hw);
@@ -3888,7 +3887,6 @@ il3945_pci_remove(struct pci_dev *pdev)iounmap (il->hw_base);pci_release_regions (pdev);pci_disable_device (pdev); -pci_set_drvdata (pdev,NULL );il_free_channel_map (il);il_free_geos (il);
drivers/net/wireless/iwlegacy/4965-mac.c +0 -2
@@ -6706,7 +6706,6 @@ out_free_eeprom: out_iounmap:iounmap (il->hw_base); out_pci_release_regions: -pci_set_drvdata (pdev,NULL );pci_release_regions (pdev); out_pci_disable_device:pci_disable_device (pdev);
@@ -6787,7 +6786,6 @@ il4965_pci_remove(struct pci_dev *pdev)iounmap (il->hw_base);pci_release_regions (pdev);pci_disable_device (pdev); -pci_set_drvdata (pdev,NULL );il4965_uninit_drv (il);
Signature · 1 line
1.7.10.4
PATCH 4/12 wireless: adm8211: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/adm8211.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/adm8211.c +0 -1
@@ -1924,7 +1924,6 @@ static int adm8211_probe(struct pci_dev *pdev,pci_iounmap (pdev, priv->map); err_free_dev: -pci_set_drvdata (pdev,NULL );ieee80211_free_hw (dev); err_free_reg:
Signature · 1 line
1.7.10.4
PATCH 5/12 wireless: airo: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/airo.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/airo.c +0 -1
@@ -5570,7 +5570,6 @@ static void airo_pci_remove(struct pci_dev *pdev)airo_print_info (dev->name,"Unregistering..." );stop_airo_card (dev,1 );pci_disable_device (pdev); -pci_set_drvdata (pdev,NULL ); }static int airo_pci_suspend (struct pci_dev *pdev,pm_message_t state)
Signature · 1 line
1.7.10.4
PATCH 6/12 wireless: ath10k: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/ath/ath10k/pci.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +0 -2
@@ -2414,7 +2414,6 @@ err_region: err_device:pci_disable_device (pdev); err_ar: -pci_set_drvdata (pdev,NULL );ath10k_core_destroy (ar); err_ar_pci:/* call HIF PCI free here */
@@ -2442,7 +2441,6 @@ static void ath10k_pci_remove(struct pci_dev *pdev)ath10k_core_unregister (ar); -pci_set_drvdata (pdev,NULL );pci_iounmap (pdev, ar_pci->mem);pci_release_region (pdev,BAR_NUM );pci_clear_master (pdev);
Signature · 1 line
1.7.10.4
Re: [PATCH 06/12] wireless: ath10k: remove unnecessary pci_set_drvdata()
Quoted 5 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>
Thanks, look good. Do you want me to apply this to my ath.git tree or are you planning to send this via some other route?
Signature · 1 line
Kalle Valo
Re: [PATCH 06/12] wireless: ath10k: remove unnecessary pci_set_drvdata()
Quoted 11 lines · Kalle Valo
Quoted 5 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>Thanks, look good. Do you want me to apply this to my ath.git tree or are you planning to send this via some other route?
Hi Kalle Valo,
It would be good that you apply this to your ath.git tree. Thank you. :-)
Best regards,
Jingoo Han
Kalle Valo
AppliedRe: [PATCH 06/12] wireless: ath10k: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanQuoted 5 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>
Thanks, applied.
Signature · 1 line
Kalle Valo
PATCH 7/12 wireless: wil6210: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/ath/wil6210/pcie_bus.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/ath/wil6210/pcie_bus.c +0 -1
@@ -197,7 +197,6 @@ static void wil_pcie_remove(struct pci_dev *pdev)pci_iounmap (pdev, wil->csr);pci_release_region (pdev,0 );pci_disable_device (pdev); -pci_set_drvdata (pdev,NULL ); }static DEFINE_PCI_DEVICE_TABLE (wil6210_pcie_ids) = {
Signature · 1 line
1.7.10.4
Re: [PATCH 07/12] wireless: wil6210: remove unnecessary pci_set_drvdata()
Quoted 15 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>--- drivers/net/wireless/ath/wil6210/pcie_bus.c | 1 - 1 file changed, 1 deletion(-)drivers/net/wireless/ath/wil6210/pcie_bus.c +0
-0
drivers/net/wireless/ath/wil6210/pcie_bus.c static void wil_pcie_remove(struct pci_dev *pdev) · line 202
Quoted 7 lines
drivers/net/wireless/ath/wil6210/pcie_bus.c +0
-1@@ -197,7 +197,6 @@ static void wil_pcie_remove(struct pci_dev *pdev)pci_iounmap (pdev, wil->csr);pci_release_region (pdev,0 );pci_disable_device (pdev); -pci_set_drvdata (pdev,NULL ); }static DEFINE_PCI_DEVICE_TABLE (wil6210_pcie_ids) = {
Here is my
PATCH 8/12 wireless: ipw2x00: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/ipw2x00/ipw2200.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/ipw2x00/ipw2200.c +0 -2
@@ -11885,7 +11885,6 @@ static int ipw_pci_probe(struct pci_dev *pdev,pci_release_regions (pdev); out_pci_disable_device:pci_disable_device (pdev); -pci_set_drvdata (pdev,NULL ); out_free_libipw:free_libipw (priv->net_dev,0 ); out:
@@ -11966,7 +11965,6 @@ static void ipw_pci_remove(struct pci_dev *pdev)iounmap (priv->hw_base);pci_release_regions (pdev);pci_disable_device (pdev); -pci_set_drvdata (pdev,NULL );/* wiphy_unregister needs to be here, before free_libipw */ wiphy_unregister (priv->ieee->wdev.wiphy);kfree (priv->ieee->a_band.channels);
Signature · 1 line
1.7.10.4
PATCH 9/12 wireless: mwl8k: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/mwl8k.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/mwl8k.c +0 -2
@@ -6093,7 +6093,6 @@ err_iounmap:if (priv->sram !=NULL )pci_iounmap (pdev, priv->sram); -pci_set_drvdata (pdev,NULL );ieee80211_free_hw (hw); err_free_reg:
@@ -6147,7 +6146,6 @@ static void mwl8k_remove(struct pci_dev *pdev) unmap:pci_iounmap (pdev, priv->regs);pci_iounmap (pdev, priv->sram); -pci_set_drvdata (pdev,NULL );ieee80211_free_hw (hw);pci_release_regions (pdev);pci_disable_device (pdev);
Signature · 1 line
1.7.10.4
PATCH 10/12 wireless: orinoco: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/orinoco/orinoco_nortel.c | 2 -- drivers/net/wireless/orinoco/orinoco_pci.c | 2 -- drivers/net/wireless/orinoco/orinoco_plx.c | 2 -- drivers/net/wireless/orinoco/orinoco_tmd.c | 2 -- 4 files changed, 8 deletions(-)
drivers/net/wireless/orinoco/orinoco_nortel.c +0 -2
@@ -234,7 +234,6 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,free_irq (pdev->irq, priv); fail_irq: -pci_set_drvdata (pdev,NULL );free_orinocodev (priv); fail_alloc:
@@ -265,7 +264,6 @@ static void orinoco_nortel_remove_one(struct pci_dev *pdev)orinoco_if_del (priv);free_irq (pdev->irq, priv); -pci_set_drvdata (pdev,NULL );free_orinocodev (priv);pci_iounmap (pdev, priv->hw.iobase);pci_iounmap (pdev, card->attr_io);
drivers/net/wireless/orinoco/orinoco_pci.c +0 -2
@@ -184,7 +184,6 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,free_irq (pdev->irq, priv); fail_irq: -pci_set_drvdata (pdev,NULL );free_orinocodev (priv); fail_alloc:
@@ -205,7 +204,6 @@ static void orinoco_pci_remove_one(struct pci_dev *pdev)orinoco_if_del (priv);free_irq (pdev->irq, priv); -pci_set_drvdata (pdev,NULL );free_orinocodev (priv);pci_iounmap (pdev, priv->hw.iobase);pci_release_regions (pdev);
drivers/net/wireless/orinoco/orinoco_plx.c +0 -2
@@ -273,7 +273,6 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,free_irq (pdev->irq, priv); fail_irq: -pci_set_drvdata (pdev,NULL );free_orinocodev (priv); fail_alloc:
@@ -301,7 +300,6 @@ static void orinoco_plx_remove_one(struct pci_dev *pdev)orinoco_if_del (priv);free_irq (pdev->irq, priv); -pci_set_drvdata (pdev,NULL );free_orinocodev (priv);pci_iounmap (pdev, priv->hw.iobase);pci_iounmap (pdev, card->attr_io);
drivers/net/wireless/orinoco/orinoco_tmd.c +0 -2
@@ -170,7 +170,6 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,free_irq (pdev->irq, priv); fail_irq: -pci_set_drvdata (pdev,NULL );free_orinocodev (priv); fail_alloc:
@@ -195,7 +194,6 @@ static void orinoco_tmd_remove_one(struct pci_dev *pdev)orinoco_if_del (priv);free_irq (pdev->irq, priv); -pci_set_drvdata (pdev,NULL );free_orinocodev (priv);pci_iounmap (pdev, priv->hw.iobase);pci_iounmap (pdev, card->bridge_io);
Signature · 1 line
1.7.10.4
PATCH 11/12 wireless: p54pci: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/p54/p54pci.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/p54/p54pci.c +0 -1
@@ -631,7 +631,6 @@ static int p54p_probe(struct pci_dev *pdev,iounmap (priv->map); err_free_dev: -pci_set_drvdata (pdev,NULL );p54_free_common (dev); err_free_reg:
Signature · 1 line
1.7.10.4
PATCH 12/12 wireless: rtl818x: remove unnecessary pci_set_drvdata()
In reply to Jingoo HanThe 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.
--- drivers/net/wireless/rtl818x/rtl8180/dev.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/rtl818x/rtl8180/dev.c +0 -1
@@ -1122,7 +1122,6 @@ static int rtl8180_probe(struct pci_dev *pdev,iounmap (priv->map); err_free_dev: -pci_set_drvdata (pdev,NULL );ieee80211_free_hw (dev); err_free_reg:
Signature · 1 line
1.7.10.4