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

drivers: gpio: mvebu: 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
dc02a0ca 92d718fd

+2 -5
+2 -5
drivers/gpio/gpio-mvebu.c
··· 1038 1038 static int mvebu_gpio_probe_raw(struct platform_device *pdev, 1039 1039 struct mvebu_gpio_chip *mvchip) 1040 1040 { 1041 - struct resource *res; 1042 1041 void __iomem *base; 1043 1042 1044 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1045 - base = devm_ioremap_resource(&pdev->dev, res); 1043 + base = devm_platform_ioremap_resource(pdev, 0); 1046 1044 if (IS_ERR(base)) 1047 1045 return PTR_ERR(base); 1048 1046 ··· 1060 1062 * per-CPU registers 1061 1063 */ 1062 1064 if (mvchip->soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) { 1063 - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 1064 - base = devm_ioremap_resource(&pdev->dev, res); 1065 + base = devm_platform_ioremap_resource(pdev, 1); 1065 1066 if (IS_ERR(base)) 1066 1067 return PTR_ERR(base); 1067 1068