diff mbox series

[36/42] drivers: gpio: uniphier: use devm_platform_ioremap_resource()

Message ID 1552330521-4276-36-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

Commit Message

Enrico Weigelt, metux IT consult March 11, 2019, 6:55 p.m. UTC
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-uniphier.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Masahiro Yamada March 12, 2019, 9:37 a.m. UTC | #1
On Tue, Mar 12, 2019 at 3: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>
> ---


Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>


>  drivers/gpio/gpio-uniphier.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
> index 0f662b2..93cdcc4 100644
> --- a/drivers/gpio/gpio-uniphier.c
> +++ b/drivers/gpio/gpio-uniphier.c
> @@ -346,7 +346,6 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
>         struct uniphier_gpio_priv *priv;
>         struct gpio_chip *chip;
>         struct irq_chip *irq_chip;
> -       struct resource *regs;
>         unsigned int nregs;
>         u32 ngpios;
>         int ret;
> @@ -370,8 +369,7 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
>         if (!priv)
>                 return -ENOMEM;
>
> -       regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       priv->regs = devm_ioremap_resource(dev, regs);
> +       priv->regs = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(priv->regs))
>                 return PTR_ERR(priv->regs);
>
> --
> 1.9.1
>
Linus Walleij April 3, 2019, 3:49 a.m. UTC | #2
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 Masahiro's ACK.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index 0f662b2..93cdcc4 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -346,7 +346,6 @@  static int uniphier_gpio_probe(struct platform_device *pdev)
 	struct uniphier_gpio_priv *priv;
 	struct gpio_chip *chip;
 	struct irq_chip *irq_chip;
-	struct resource *regs;
 	unsigned int nregs;
 	u32 ngpios;
 	int ret;
@@ -370,8 +369,7 @@  static int uniphier_gpio_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->regs = devm_ioremap_resource(dev, regs);
+	priv->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->regs))
 		return PTR_ERR(priv->regs);