public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] mfd: syscon: Make use of of_iomap
Date: Tue, 9 Aug 2016 13:57:53 +0100	[thread overview]
Message-ID: <20160809125753.GH5243@dell> (raw)
In-Reply-To: <1470589699-7079-1-git-send-email-andrew.smirnov@gmail.com>

On Sun, 07 Aug 2016, Andrey Smirnov wrote:

> Use of_iomap instead of explicitly calling of_address_to_resource() and
> ioremap().
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/syscon.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index 2f2225e..55b883d 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -59,12 +59,7 @@ static struct syscon *of_syscon_register(struct device_node *np)
>  	if (!syscon)
>  		return ERR_PTR(-ENOMEM);
>  
> -	if (of_address_to_resource(np, 0, &res)) {
> -		ret = -ENOMEM;
> -		goto err_map;
> -	}
> -
> -	base = ioremap(res.start, resource_size(&res));
> +	base = of_iomap(np, 0);
>  	if (!base) {
>  		ret = -ENOMEM;
>  		goto err_map;

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

      parent reply	other threads:[~2016-08-09 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-07 17:08 [PATCH] mfd: syscon: Make use of of_iomap Andrey Smirnov
2016-08-07 20:01 ` Arnd Bergmann
2016-08-09 12: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=20160809125753.GH5243@dell \
    --to=lee.jones@linaro.org \
    --cc=andrew.smirnov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@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