Commit 542c25b7 authored by Enrico Weigelt, metux IT consult's avatar Enrico Weigelt, metux IT consult Committed by Linus Walleij

drivers: gpio: pxa: 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>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 037ae5bc
...@@ -622,7 +622,6 @@ static int pxa_gpio_probe(struct platform_device *pdev) ...@@ -622,7 +622,6 @@ static int pxa_gpio_probe(struct platform_device *pdev)
{ {
struct pxa_gpio_chip *pchip; struct pxa_gpio_chip *pchip;
struct pxa_gpio_bank *c; struct pxa_gpio_bank *c;
struct resource *res;
struct clk *clk; struct clk *clk;
struct pxa_gpio_platform_data *info; struct pxa_gpio_platform_data *info;
void __iomem *gpio_reg_base; void __iomem *gpio_reg_base;
...@@ -665,11 +664,8 @@ static int pxa_gpio_probe(struct platform_device *pdev) ...@@ -665,11 +664,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
pchip->irq0 = irq0; pchip->irq0 = irq0;
pchip->irq1 = irq1; pchip->irq1 = irq1;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
return -EINVAL;
gpio_reg_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (!gpio_reg_base) if (!gpio_reg_base)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment