[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMpxmJVe2C1RSHq0xVDSdNEK0S06e2Q=tp5k5QJXdCTG2DzJbQ@mail.gmail.com>
Date: Mon, 29 Apr 2019 09:53:18 +0200
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Andrey Smirnov <andrew.smirnov@...il.com>
Cc: linux-gpio <linux-gpio@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Chris Healy <cphealy@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] gpio: vf610: Use devm_platform_ioremap_resource()
pon., 29 kwi 2019 o 07:50 Andrey Smirnov <andrew.smirnov@...il.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@...il.com>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: Bartosz Golaszewski <bgolaszewski@...libre.com>
> Cc: Chris Healy <cphealy@...il.com>
> Cc: linux-gpio@...r.kernel.org
> Cc: linux-kernel@...r.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@...libre.com>
Powered by blists - more mailing lists