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

drivers: gpio: spear-spics: 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
7290f152 ecbf7c2e

+1 -3
+1 -3
drivers/gpio/gpio-spear-spics.c
··· 122 122 { 123 123 struct device_node *np = pdev->dev.of_node; 124 124 struct spear_spics *spics; 125 - struct resource *res; 126 125 int ret; 127 126 128 127 spics = devm_kzalloc(&pdev->dev, sizeof(*spics), GFP_KERNEL); 129 128 if (!spics) 130 129 return -ENOMEM; 131 130 132 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 133 - spics->base = devm_ioremap_resource(&pdev->dev, res); 131 + spics->base = devm_platform_ioremap_resource(pdev, 0); 134 132 if (IS_ERR(spics->base)) 135 133 return PTR_ERR(spics->base); 136 134