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

drivers: gpio: octeon: 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: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Enrico Weigelt, metux IT consult and committed by
Linus Walleij
037ae5bc 123ac0e5

+1 -3
+1 -3
drivers/gpio/gpio-octeon.c
··· 82 82 { 83 83 struct octeon_gpio *gpio; 84 84 struct gpio_chip *chip; 85 - struct resource *res_mem; 86 85 void __iomem *reg_base; 87 86 int err = 0; 88 87 ··· 90 91 return -ENOMEM; 91 92 chip = &gpio->chip; 92 93 93 - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 94 - reg_base = devm_ioremap_resource(&pdev->dev, res_mem); 94 + reg_base = devm_platform_ioremap_resource(pdev, 0); 95 95 if (IS_ERR(reg_base)) 96 96 return PTR_ERR(reg_base); 97 97