Commit 47b4916c authored by Enrico Weigelt, metux IT consult's avatar Enrico Weigelt, metux IT consult Committed by Linus Walleij
Browse files

drivers: gpio: lpc18xx: 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: default avatarEnrico Weigelt, metux IT consult <info@metux.net>
Acked-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 62fe072a
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;