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: Enrico Weigelt, metux IT consult <info@metux.net> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
62fe072a24
commit
47b4916cb4
|
@ -340,10 +340,7 @@ static int lpc18xx_gpio_probe(struct platform_device *pdev)
|
||||||
index = of_property_match_string(dev->of_node, "reg-names", "gpio");
|
index = of_property_match_string(dev->of_node, "reg-names", "gpio");
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
/* To support backward compatibility take the first resource */
|
/* To support backward compatibility take the first resource */
|
||||||
struct resource *res;
|
gc->base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
||||||
gc->base = devm_ioremap_resource(dev, res);
|
|
||||||
} else {
|
} else {
|
||||||
struct resource res;
|
struct resource res;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue