Message ID | 1552330521-4276-29-git-send-email-info@metux.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/42] drivers: gpio: 74xx-mmio: use devm_platform_ioremap_resource() | expand |
Hi, On Tue, 12 Mar 2019 at 02:57, Enrico Weigelt, metux IT consult <info@metux.net> 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 <info@metux.net> > --- > drivers/gpio/gpio-sprd.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c > index 55072d2..f5c8b3a 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); > Thanks for your patch. Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult <info@metux.net> 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 <info@metux.net> Patch applied with Baolin's ACK. Yours, Linus Walleij
Hi Linus, On Tue, 2 Apr 2019 at 17:04, Linus Walleij <linus.walleij@linaro.org> wrote: > > On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult > <info@metux.net> 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 <info@metux.net> > > 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.
On Tue, Apr 2, 2019 at 4:10 PM Baolin Wang <baolin.wang@linaro.org> wrote: > On Tue, 2 Apr 2019 at 17:04, Linus Walleij <linus.walleij@linaro.org> wrote: > > > > On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult > > <info@metux.net> 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 <info@metux.net> > > > > 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: commit 851f66daeab961328507dcce0980cd7e4ff5f9ae (HEAD -> devel) Author: Enrico Weigelt, metux IT consult <info@metux.net> 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 <info@metux.net> Reviewed-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> 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
On Tue, 2 Apr 2019 at 17:19, Linus Walleij <linus.walleij@linaro.org> wrote: > > On Tue, Apr 2, 2019 at 4:10 PM Baolin Wang <baolin.wang@linaro.org> wrote: > > On Tue, 2 Apr 2019 at 17:04, Linus Walleij <linus.walleij@linaro.org> wrote: > > > > > > On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult > > > <info@metux.net> 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 <info@metux.net> > > > > > > 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 <info@metux.net> > 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 <info@metux.net> > Reviewed-by: Baolin Wang <baolin.wang@linaro.org> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > > 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
diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c index 55072d2..f5c8b3a 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);
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 <info@metux.net> --- drivers/gpio/gpio-sprd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)