On Tue, 2 Apr 2019 at 17:19, Linus Walleij <[email protected]> wrote:
>
> On Tue, Apr 2, 2019 at 4:10 PM Baolin Wang <[email protected]> wrote:
> > On Tue, 2 Apr 2019 at 17:04, Linus Walleij <[email protected]> wrote:
> > >
> > > On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
> > > <[email protected]> wrote:
> > >
> > > > Use the new helper that wraps the calls to platform_get_resource()
> > > > and devm_ioremap_resource() together.
> > > >
> > > > Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
> > >
> > > Patch applied with Baolin's ACK.
> >
> > This patch had some problems which I've pointed out and I did not ack
> > this patch. Please do not apply it now until fixing the problem.
>
> Sorry, it's the gmail threading that confuse the different patches.
>
> The patch I actually applied is for gpio-sprd.c and looks like this:

Yes, this one is correct.  Thanks :)

>
> commit 851f66daeab961328507dcce0980cd7e4ff5f9ae (HEAD -> devel)
> Author: Enrico Weigelt, metux IT consult <[email protected]>
> Date:   Mon Mar 11 19:55:08 2019 +0100
>
>     drivers: gpio: sprd: use devm_platform_ioremap_resource()
>
>     Use the new helper that wraps the calls to platform_get_resource()
>     and devm_ioremap_resource() together.
>
>     Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
>     Reviewed-by: Baolin Wang <[email protected]>
>     Signed-off-by: Linus Walleij <[email protected]>
>
> diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c
> index 55072d2b367f..f5c8b3a351d5 100644
> --- a/drivers/gpio/gpio-sprd.c
> +++ b/drivers/gpio/gpio-sprd.c
> @@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev)
>  {
>         struct gpio_irq_chip *irq;
>         struct sprd_gpio *sprd_gpio;
> -       struct resource *res;
>         int ret;
>
>         sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL);
> @@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev)
>                 return sprd_gpio->irq;
>         }
>
> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res);
> +       sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(sprd_gpio->base))
>                 return PTR_ERR(sprd_gpio->base);
>
> Yours,
> Linus Walleij



-- 
Baolin Wang
Best Regards

Reply via email to