linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: linux-gpio <linux-gpio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Chris Healy <cphealy@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] gpio: vf610: Use devm_platform_ioremap_resource()
Date: Mon, 29 Apr 2019 09:53:18 +0200	[thread overview]
Message-ID: <CAMpxmJVe2C1RSHq0xVDSdNEK0S06e2Q=tp5k5QJXdCTG2DzJbQ@mail.gmail.com> (raw)
In-Reply-To: <20190429054948.9185-1-andrew.smirnov@gmail.com>

pon., 29 kwi 2019 o 07:50 Andrey Smirnov <andrew.smirnov@gmail.com> napisał(a):
>
> Replace calls to platform_get_resource() and devm_ioremap_resource()
> with newly added devm_platform_ioremap_resource() for brevity. No
> functional change intended.
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Cc: Chris Healy <cphealy@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  drivers/gpio/gpio-vf610.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
> index 6f6558715b88..30aef41e3b7e 100644
> --- a/drivers/gpio/gpio-vf610.c
> +++ b/drivers/gpio/gpio-vf610.c
> @@ -242,7 +242,6 @@ static int vf610_gpio_probe(struct platform_device *pdev)
>         struct device *dev = &pdev->dev;
>         struct device_node *np = dev->of_node;
>         struct vf610_gpio_port *port;
> -       struct resource *iores;
>         struct gpio_chip *gc;
>         struct irq_chip *ic;
>         int i;
> @@ -253,13 +252,11 @@ static int vf610_gpio_probe(struct platform_device *pdev)
>                 return -ENOMEM;
>
>         port->sdata = of_device_get_match_data(dev);
> -       iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       port->base = devm_ioremap_resource(dev, iores);
> +       port->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(port->base))
>                 return PTR_ERR(port->base);
>
> -       iores = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -       port->gpio_base = devm_ioremap_resource(dev, iores);
> +       port->gpio_base = devm_platform_ioremap_resource(pdev, 1);
>         if (IS_ERR(port->gpio_base))
>                 return PTR_ERR(port->gpio_base);
>
> --
> 2.20.1
>

Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

      parent reply	other threads:[~2019-04-29  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  5:49 [PATCH 1/2] gpio: vf610: Use devm_platform_ioremap_resource() Andrey Smirnov
2019-04-29  5:49 ` [PATCH 2/2] gpio: vf610: Use PTR_ERR_OR_ZERO() in vf610_gpio_probe() Andrey Smirnov
2019-04-29  8:05   ` Bartosz Golaszewski
2019-05-16 12:00   ` Linus Walleij
2019-04-29  7:53 ` Bartosz Golaszewski [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='CAMpxmJVe2C1RSHq0xVDSdNEK0S06e2Q=tp5k5QJXdCTG2DzJbQ@mail.gmail.com' \
    --to=bgolaszewski@baylibre.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).