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

drivers: gpio: zx: 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
8d86f985 6ff49fba

+1 -3
+1 -3
drivers/gpio/gpio-zx.c
··· 218 218 { 219 219 struct device *dev = &pdev->dev; 220 220 struct zx_gpio *chip; 221 - struct resource *res; 222 221 int irq, id, ret; 223 222 224 223 chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL); 225 224 if (!chip) 226 225 return -ENOMEM; 227 226 228 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 229 - chip->base = devm_ioremap_resource(dev, res); 227 + chip->base = devm_platform_ioremap_resource(pdev, 0); 230 228 if (IS_ERR(chip->base)) 231 229 return PTR_ERR(chip->base); 232 230