Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Bartosz Golaszewski and committed by
Linus Walleij
fa7569c8 7945f929

+1 -3
+1 -3
drivers/gpio/gpio-davinci.c
··· 198 198 struct davinci_gpio_controller *chips; 199 199 struct davinci_gpio_platform_data *pdata; 200 200 struct device *dev = &pdev->dev; 201 - struct resource *res; 202 201 203 202 pdata = davinci_gpio_get_pdata(pdev); 204 203 if (!pdata) { ··· 235 236 if (!chips) 236 237 return -ENOMEM; 237 238 238 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 239 - gpio_base = devm_ioremap_resource(dev, res); 239 + gpio_base = devm_platform_ioremap_resource(pdev, 0); 240 240 if (IS_ERR(gpio_base)) 241 241 return PTR_ERR(gpio_base); 242 242