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

drivers: gpio: vf610: 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
df53665b 83fa76b6

+2 -5
+2 -5
drivers/gpio/gpio-vf610.c
··· 251 251 struct device *dev = &pdev->dev; 252 252 struct device_node *np = dev->of_node; 253 253 struct vf610_gpio_port *port; 254 - struct resource *iores; 255 254 struct gpio_chip *gc; 256 255 int i; 257 256 int ret; ··· 260 261 return -ENOMEM; 261 262 262 263 port->sdata = of_device_get_match_data(dev); 263 - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); 264 - port->base = devm_ioremap_resource(dev, iores); 264 + port->base = devm_platform_ioremap_resource(pdev, 0); 265 265 if (IS_ERR(port->base)) 266 266 return PTR_ERR(port->base); 267 267 268 - iores = platform_get_resource(pdev, IORESOURCE_MEM, 1); 269 - port->gpio_base = devm_ioremap_resource(dev, iores); 268 + port->gpio_base = devm_platform_ioremap_resource(pdev, 1); 270 269 if (IS_ERR(port->gpio_base)) 271 270 return PTR_ERR(port->gpio_base); 272 271