drivers: gpio: lpc18xx: use devm_platform_ioremap_resource()
authorEnrico Weigelt, metux IT consult <info@metux.net>
Mon, 11 Mar 2019 18:54:57 +0000 (19:54 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Apr 2019 17:04:26 +0000 (00:04 +0700)
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: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-lpc18xx.c

index d441dbaed7a3d2bd22df11e00c1ab5930ae0f059..d711ae06747eeff69e2a0b9b6972fb9b2bef6427 100644 (file)
@@ -340,10 +340,7 @@ static int lpc18xx_gpio_probe(struct platform_device *pdev)
        index = of_property_match_string(dev->of_node, "reg-names", "gpio");
        if (index < 0) {
                /* To support backward compatibility take the first resource */
-               struct resource *res;
-
-               res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-               gc->base = devm_ioremap_resource(dev, res);
+               gc->base = devm_platform_ioremap_resource(pdev, 0);
        } else {
                struct resource res;