Commit 2a7194e9 authored by Enrico Weigelt, metux IT consult's avatar Enrico Weigelt, metux IT consult Committed by Linus Walleij

drivers: gpio: dwap: 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 09ec4735
...@@ -655,7 +655,6 @@ MODULE_DEVICE_TABLE(acpi, dwapb_acpi_match); ...@@ -655,7 +655,6 @@ MODULE_DEVICE_TABLE(acpi, dwapb_acpi_match);
static int dwapb_gpio_probe(struct platform_device *pdev) static int dwapb_gpio_probe(struct platform_device *pdev)
{ {
unsigned int i; unsigned int i;
struct resource *res;
struct dwapb_gpio *gpio; struct dwapb_gpio *gpio;
int err; int err;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
...@@ -688,8 +687,7 @@ static int dwapb_gpio_probe(struct platform_device *pdev) ...@@ -688,8 +687,7 @@ static int dwapb_gpio_probe(struct platform_device *pdev)
if (!gpio->ports) if (!gpio->ports)
return -ENOMEM; return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); gpio->regs = devm_platform_ioremap_resource(pdev, 0);
gpio->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(gpio->regs)) if (IS_ERR(gpio->regs))
return PTR_ERR(gpio->regs); return PTR_ERR(gpio->regs);
......
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