Skip to content

Commit

Permalink
gpio: davinci: use devm_platform_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartosz Golaszewski authored and Linus Walleij committed Feb 21, 2019
1 parent 7945f92 commit fa7569c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpio/gpio-davinci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit fa7569c

Please sign in to comment.