diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2019-03-11 14:55:06 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-04-04 13:04:27 -0400 |
commit | ecbf7c2e8bb323cf96758b3911766058fabc360e (patch) | |
tree | d3a040fe0118eac621d0498e063894491979b1f5 | |
parent | 542c25b7a209697f383b781da2762154fb59eaa8 (diff) |
drivers: gpio: rcar: 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: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-rcar.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 500a3596aaf4..70e95fc4779f 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c | |||
@@ -430,7 +430,7 @@ static int gpio_rcar_parse_dt(struct gpio_rcar_priv *p, unsigned int *npins) | |||
430 | static int gpio_rcar_probe(struct platform_device *pdev) | 430 | static int gpio_rcar_probe(struct platform_device *pdev) |
431 | { | 431 | { |
432 | struct gpio_rcar_priv *p; | 432 | struct gpio_rcar_priv *p; |
433 | struct resource *io, *irq; | 433 | struct resource *irq; |
434 | struct gpio_chip *gpio_chip; | 434 | struct gpio_chip *gpio_chip; |
435 | struct irq_chip *irq_chip; | 435 | struct irq_chip *irq_chip; |
436 | struct device *dev = &pdev->dev; | 436 | struct device *dev = &pdev->dev; |
@@ -461,8 +461,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) | |||
461 | goto err0; | 461 | goto err0; |
462 | } | 462 | } |
463 | 463 | ||
464 | io = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 464 | p->base = devm_platform_ioremap_resource(pdev, 0); |
465 | p->base = devm_ioremap_resource(dev, io); | ||
466 | if (IS_ERR(p->base)) { | 465 | if (IS_ERR(p->base)) { |
467 | ret = PTR_ERR(p->base); | 466 | ret = PTR_ERR(p->base); |
468 | goto err0; | 467 | goto err0; |