Commit fa7569c8 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Linus Walleij

gpio: davinci: 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 avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 7945f929
...@@ -198,7 +198,6 @@ static int davinci_gpio_probe(struct platform_device *pdev) ...@@ -198,7 +198,6 @@ static int davinci_gpio_probe(struct platform_device *pdev)
struct davinci_gpio_controller *chips; struct davinci_gpio_controller *chips;
struct davinci_gpio_platform_data *pdata; struct davinci_gpio_platform_data *pdata;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *res;
pdata = davinci_gpio_get_pdata(pdev); pdata = davinci_gpio_get_pdata(pdev);
if (!pdata) { if (!pdata) {
...@@ -236,8 +235,7 @@ static int davinci_gpio_probe(struct platform_device *pdev) ...@@ -236,8 +235,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
if (!chips) if (!chips)
return -ENOMEM; return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); gpio_base = devm_platform_ioremap_resource(pdev, 0);
gpio_base = devm_ioremap_resource(dev, res);
if (IS_ERR(gpio_base)) if (IS_ERR(gpio_base))
return PTR_ERR(gpio_base); return PTR_ERR(gpio_base);
......
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