]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drivers: gpio: dwap: use devm_platform_ioremap_resource()
authorEnrico Weigelt, metux IT consult <info@metux.net>
Mon, 11 Mar 2019 18:54:47 +0000 (19:54 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Apr 2019 17:04:26 +0000 (00:04 +0700)
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>
drivers/gpio/gpio-dwapb.c

index 84ae04402f7051de33ae7787235ad830c0dddb58..d3eda65fd6d37b08a46d837dba33c22cc260a0e5 100644 (file)
@@ -655,7 +655,6 @@ MODULE_DEVICE_TABLE(acpi, dwapb_acpi_match);
 static int dwapb_gpio_probe(struct platform_device *pdev)
 {
        unsigned int i;
-       struct resource *res;
        struct dwapb_gpio *gpio;
        int err;
        struct device *dev = &pdev->dev;
@@ -688,8 +687,7 @@ static int dwapb_gpio_probe(struct platform_device *pdev)
        if (!gpio->ports)
                return -ENOMEM;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       gpio->regs = devm_ioremap_resource(&pdev->dev, res);
+       gpio->regs = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(gpio->regs))
                return PTR_ERR(gpio->regs);