]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drivers: gpio: zx: use devm_platform_ioremap_resource()
authorEnrico Weigelt, metux IT consult <info@metux.net>
Mon, 11 Mar 2019 18:55:19 +0000 (19:55 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Apr 2019 17:04:28 +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-zx.c

index 5eacad9b2692111dc2e97b5a68a5f3ac8f86d68a..fb927559aefa8b8e641ea2af14d7f709f708ee99 100644 (file)
@@ -218,15 +218,13 @@ static int zx_gpio_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct zx_gpio *chip;
-       struct resource *res;
        int irq, id, ret;
 
        chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
        if (!chip)
                return -ENOMEM;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       chip->base = devm_ioremap_resource(dev, res);
+       chip->base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(chip->base))
                return PTR_ERR(chip->base);