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

drivers: gpio: hlwd: 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
8f701e1d b35263db

+1 -3
+1 -3
drivers/gpio/gpio-hlwd.c
··· 208 208 static int hlwd_gpio_probe(struct platform_device *pdev) 209 209 { 210 210 struct hlwd_gpio *hlwd; 211 - struct resource *regs_resource; 212 211 u32 ngpios; 213 212 int res; 214 213 ··· 215 216 if (!hlwd) 216 217 return -ENOMEM; 217 218 218 - regs_resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); 219 - hlwd->regs = devm_ioremap_resource(&pdev->dev, regs_resource); 219 + hlwd->regs = devm_platform_ioremap_resource(pdev, 0); 220 220 if (IS_ERR(hlwd->regs)) 221 221 return PTR_ERR(hlwd->regs); 222 222