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

drivers: gpio: loongon1: 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
62fe072a 38b1e680

+1 -3
+1 -3
drivers/gpio/gpio-loongson1.c
··· 47 47 { 48 48 struct device *dev = &pdev->dev; 49 49 struct gpio_chip *gc; 50 - struct resource *res; 51 50 int ret; 52 51 53 52 gc = devm_kzalloc(dev, sizeof(*gc), GFP_KERNEL); 54 53 if (!gc) 55 54 return -ENOMEM; 56 55 57 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 58 - gpio_reg_base = devm_ioremap_resource(dev, res); 56 + gpio_reg_base = devm_platform_ioremap_resource(pdev, 0); 59 57 if (IS_ERR(gpio_reg_base)) 60 58 return PTR_ERR(gpio_reg_base); 61 59