drivers: gpio: stp-xway: use devm_platform_ioremap_resource()
authorEnrico Weigelt, metux IT consult <info@metux.net>
Mon, 11 Mar 2019 18:55:10 +0000 (19:55 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Apr 2019 17:04:27 +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-stp-xway.c

index 19972084c45bb11b4ec0167ef36071d00f8123b4..8a319d56c5de731a756936ebe5ba88ca72fa52d6 100644 (file)
@@ -210,7 +210,6 @@ static int xway_stp_hw_init(struct xway_stp *chip)
 
 static int xway_stp_probe(struct platform_device *pdev)
 {
-       struct resource *res;
        u32 shadow, groups, dsl, phy;
        struct xway_stp *chip;
        struct clk *clk;
@@ -220,8 +219,7 @@ static int xway_stp_probe(struct platform_device *pdev)
        if (!chip)
                return -ENOMEM;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       chip->virt = devm_ioremap_resource(&pdev->dev, res);
+       chip->virt = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(chip->virt))
                return PTR_ERR(chip->virt);