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

drivers: gpio: xlp: 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
3883de02 8d86f985

+1 -6
+1 -6
drivers/gpio/gpio-xlp.c
··· 290 290 static int xlp_gpio_probe(struct platform_device *pdev) 291 291 { 292 292 struct gpio_chip *gc; 293 - struct resource *iores; 294 293 struct xlp_gpio_priv *priv; 295 294 void __iomem *gpio_base; 296 295 int irq_base, irq, err; 297 296 int ngpio; 298 297 u32 soc_type; 299 298 300 - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); 301 - if (!iores) 302 - return -ENODEV; 303 - 304 299 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 305 300 if (!priv) 306 301 return -ENOMEM; 307 302 308 - gpio_base = devm_ioremap_resource(&pdev->dev, iores); 303 + gpio_base = devm_platform_ioremap_resource(pdev, 0); 309 304 if (IS_ERR(gpio_base)) 310 305 return PTR_ERR(gpio_base); 311 306