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

gpio: grgpio: 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
01d078aa 6bdec6c7

+1 -3
+1 -3
drivers/gpio/gpio-grgpio.c
··· 333 333 void __iomem *regs; 334 334 struct gpio_chip *gc; 335 335 struct grgpio_priv *priv; 336 - struct resource *res; 337 336 int err; 338 337 u32 prop; 339 338 s32 *irqmap; ··· 343 344 if (!priv) 344 345 return -ENOMEM; 345 346 346 - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); 347 - regs = devm_ioremap_resource(&ofdev->dev, res); 347 + regs = devm_platform_ioremap_resource(ofdev, 0); 348 348 if (IS_ERR(regs)) 349 349 return PTR_ERR(regs); 350 350