ath5k: add missing iounmap to AHB probe removal
When our driver device is removed on the AHB bus, our IO memory is never unmapped.
drivers/net/wireless/ath/ath5k/ahb.c +3 -0
@@ -197,12 +197,14 @@ static int ath_ahb_remove(struct platform_device *pdev)struct ar231x_board_config *bcfg = pdev->dev.platform_data;struct ieee80211_hw *hw =platform_get_drvdata (pdev);struct ath5k_hw *ah; +void __iomem *mem;u32 reg;if (!hw)return 0 ; ah = hw->priv; + mem = ah->iobase;if (bcfg->devid >=AR5K_SREV_AR2315_R6 ) {/* Disable WMAC AHB arbitration */
@@ -222,6 +224,7 @@ static int ath_ahb_remove(struct platform_device *pdev)ath5k_deinit_ah (ah);platform_set_drvdata (pdev,NULL );ieee80211_free_hw (hw); +iounmap (mem);return 0 ; }
Hi Jonathan,
Quoted 24 lines · Jonathan Bither
When our driver device is removed on the AHB bus, our IO memory is never unmapped.
Signed-off-by Jonathan Bither<[email protected]>drivers/net/wireless/ath/ath5k/ahb.c +2
-0@@ -197,12 +197,14 @@ static int ath_ahb_remove(struct platform_device *pdev)struct ar231x_board_config *bcfg = pdev->dev.platform_data;struct ieee80211_hw *hw =platform_get_drvdata (pdev);struct ath5k_hw *ah; +void __iomem *mem;u32 reg;if (!hw)return 0 ; ah = hw->priv; + mem = ah->iobase;if (bcfg->devid>=AR5K_SREV_AR2315_R6 ) {/* Disable WMAC AHB arbitration */
drivers/net/wireless/ath/ath5k/ahb.c static int ath_ahb_remove(struct platform_device *pdev) · line 227
Quoted 4 lines
drivers/net/wireless/ath/ath5k/ahb.c +1
-0@@ -222,6 +224,7 @@ static int ath_ahb_remove(struct platform_device *pdev)ath5k_deinit_ah (ah);platform_set_drvdata (pdev,NULL );ieee80211_free_hw (hw); +iounmap (mem);
You don't need this temporary variable, just use iounmap(ah->iobase) after ath5k_deinit_ah(ah) just like how it is done in the PCI case. --
Florian
Alright, thanks for the reviewal. I'll submit a V2
Quoted 35 lines · Florian Fainelli
Hi Jonathan,
Quoted 24 lines · Jonathan Bither
When our driver device is removed on the AHB bus, our IO memory is never unmapped.
Signed-off-by Jonathan Bither<[email protected]>drivers/net/wireless/ath/ath5k/ahb.c +2
-0@@ -197,12 +197,14 @@ static int ath_ahb_remove(struct platform_device *pdev)struct ar231x_board_config *bcfg = pdev->dev.platform_data;struct ieee80211_hw *hw =platform_get_drvdata (pdev);struct ath5k_hw *ah; +void __iomem *mem;u32 reg;if (!hw)return 0 ; ah = hw->priv; + mem = ah->iobase;if (bcfg->devid>=AR5K_SREV_AR2315_R6 ) {/* Disable WMAC AHB arbitration */ drivers/net/wireless/ath/ath5k/ahb.c static int ath_ahb_remove(struct platform_device *pdev) · line 227
Quoted 4 lines
drivers/net/wireless/ath/ath5k/ahb.c +1
-0@@ -222,6 +224,7 @@ static int ath_ahb_remove(struct platform_device *pdev)ath5k_deinit_ah (ah);platform_set_drvdata (pdev,NULL );ieee80211_free_hw (hw); +iounmap (mem);You don't need this temporary variable, just use
iounmap(ah->iobase)afterath5k_deinit_ah(ah)just like how it is done in the PCI case.Signature · 1 line
Florian