All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Bither <jonbither@gmail.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: ath5k: add missing iounmap to AHB probe removal
Date: Tue, 24 Apr 2012 04:45:47 -0400	[thread overview]
Message-ID: <4F96683B.80106@gmail.com> (raw)
In-Reply-To: <4F96677C.40901@openwrt.org>

Alright, thanks for the reviewal. I'll submit a V2

On 04/24/2012 04:42 AM, Florian Fainelli wrote:
> Hi Jonathan,
> 
> Le 04/24/12 10:29, Jonathan Bither a écrit :
>> When our driver device is removed on the AHB bus, our IO memory is never unmapped.
>>
>> Signed-off-by: Jonathan Bither<jonbither@gmail.com>
>>
>> diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c
>> index 8c50d9d..eebf439 100644
>> --- a/drivers/net/wireless/ath/ath5k/ahb.c
>> +++ b/drivers/net/wireless/ath/ath5k/ahb.c
>> @@ -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);
> 
> 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

      reply	other threads:[~2012-04-24  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24  8:29 ath5k: add missing iounmap to AHB probe removal Jonathan Bither
2012-04-24  8:42 ` Florian Fainelli
2012-04-24  8:45   ` Jonathan Bither [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F96683B.80106@gmail.com \
    --to=jonbither@gmail.com \
    --cc=florian@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.