linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Jonathan Bither <jonbither@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: ath5k: add missing iounmap to AHB probe removal
Date: Tue, 24 Apr 2012 10:42:36 +0200	[thread overview]
Message-ID: <4F96677C.40901@openwrt.org> (raw)
In-Reply-To: <4F96647F.9060803@gmail.com>

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:44 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 [this message]
2012-04-24  8:45   ` Jonathan Bither

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=4F96677C.40901@openwrt.org \
    --to=florian@openwrt.org \
    --cc=jonbither@gmail.com \
    --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 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).