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

drivers: gpio: ftgpio010: 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
b35263db 94a2d427

+1 -3
+1 -3
drivers/gpio/gpio-ftgpio010.c
··· 225 225 static int ftgpio_gpio_probe(struct platform_device *pdev) 226 226 { 227 227 struct device *dev = &pdev->dev; 228 - struct resource *res; 229 228 struct ftgpio_gpio *g; 230 229 int irq; 231 230 int ret; ··· 235 236 236 237 g->dev = dev; 237 238 238 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 239 - g->base = devm_ioremap_resource(dev, res); 239 + g->base = devm_platform_ioremap_resource(pdev, 0); 240 240 if (IS_ERR(g->base)) 241 241 return PTR_ERR(g->base); 242 242