linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: sameo@linux.intel.com, yongjun_wei@trendmicro.com.cn,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] mfd: htc-egpio: use devm_ioremap_nocache() instead of ioremap_nocache()
Date: Wed, 19 Jun 2013 08:57:35 +0100	[thread overview]
Message-ID: <20130619075735.GE31320@laptop> (raw)
In-Reply-To: <CAPgLHd-k_HkBa+oKU+7gPZfY3vT4u-xzsKZTqjkw_GdyK1rGcg@mail.gmail.com>

On Wed, 19 Jun 2013, Wei Yongjun wrote:

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Replace probe-time ioremap_nocache() call with devm_ioremap_nocache()
> to avoid iounmap() missing and get rid of the corresponding iounmap()
> call on remove.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/mfd/htc-egpio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
> index f2e0ad4..26aca54 100644
> --- a/drivers/mfd/htc-egpio.c
> +++ b/drivers/mfd/htc-egpio.c
> @@ -286,7 +286,8 @@ static int __init egpio_probe(struct platform_device *pdev)
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res)
>  		goto fail;
> -	ei->base_addr = ioremap_nocache(res->start, resource_size(res));
> +	ei->base_addr = devm_ioremap_nocache(&pdev->dev, res->start,
> +					     resource_size(res));
>  	if (!ei->base_addr)
>  		goto fail;
>  	pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
> @@ -380,7 +381,6 @@ static int __exit egpio_remove(struct platform_device *pdev)
>  		irq_set_chained_handler(ei->chained_irq, NULL);
>  		device_init_wakeup(&pdev->dev, 0);
>  	}
> -	iounmap(ei->base_addr);
>  
>  	return 0;
>  }

Applied, thanks.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2013-06-19  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  2:47 [PATCH -next] mfd: htc-egpio: use devm_ioremap_nocache() instead of ioremap_nocache() Wei Yongjun
2013-06-19  7:57 ` Lee Jones [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=20130619075735.GE31320@laptop \
    --to=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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).