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

drivers: gpio: sprd: 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>
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Enrico Weigelt, metux IT consult and committed by
Linus Walleij
94a2d427 2a7194e9

+1 -3
+1 -3
drivers/gpio/gpio-sprd.c
··· 219 219 { 220 220 struct gpio_irq_chip *irq; 221 221 struct sprd_gpio *sprd_gpio; 222 - struct resource *res; 223 222 int ret; 224 223 225 224 sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL); ··· 231 232 return sprd_gpio->irq; 232 233 } 233 234 234 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 235 - sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res); 235 + sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0); 236 236 if (IS_ERR(sprd_gpio->base)) 237 237 return PTR_ERR(sprd_gpio->base); 238 238