Skip to content

Commit

Permalink
drivers: gpio: pxa: use devm_platform_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Enrico Weigelt, metux IT consult authored and Linus Walleij committed Apr 4, 2019
1 parent 037ae5b commit 542c25b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/gpio/gpio-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ static int pxa_gpio_probe(struct platform_device *pdev)
{
struct pxa_gpio_chip *pchip;
struct pxa_gpio_bank *c;
struct resource *res;
struct clk *clk;
struct pxa_gpio_platform_data *info;
void __iomem *gpio_reg_base;
Expand Down Expand Up @@ -665,11 +664,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)

pchip->irq0 = irq0;
pchip->irq1 = irq1;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -EINVAL;
gpio_reg_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));

gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
if (!gpio_reg_base)
return -EINVAL;

Expand Down

0 comments on commit 542c25b

Please sign in to comment.