gpio: davinci: use devm_platform_ioremap_resource()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 20 Feb 2019 11:12:40 +0000 (12:12 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 21 Feb 2019 12:05:52 +0000 (13:05 +0100)
Use the new helper that wraps the calls to platform_get_resource() and
devm_ioremap_resource() together.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-davinci.c

index bdb29e51b4176390a5614985e96021780fd8111c..188b8e5c8e67b8dc8ae7db3ffc29999f1a768536 100644 (file)
@@ -198,7 +198,6 @@ static int davinci_gpio_probe(struct platform_device *pdev)
        struct davinci_gpio_controller *chips;
        struct davinci_gpio_platform_data *pdata;
        struct device *dev = &pdev->dev;
-       struct resource *res;
 
        pdata = davinci_gpio_get_pdata(pdev);
        if (!pdata) {
@@ -236,8 +235,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
        if (!chips)
                return -ENOMEM;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       gpio_base = devm_ioremap_resource(dev, res);
+       gpio_base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(gpio_base))
                return PTR_ERR(gpio_base);