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

drivers: gpio: mt7621: 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: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Enrico Weigelt, metux IT consult and committed by
Linus Walleij
92d718fd 329e23f9

+1 -2
+1 -2
drivers/gpio/gpio-mt7621.c
··· 293 293 static int 294 294 mediatek_gpio_probe(struct platform_device *pdev) 295 295 { 296 - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 297 296 struct device *dev = &pdev->dev; 298 297 struct device_node *np = dev->of_node; 299 298 struct mtk *mtk; ··· 303 304 if (!mtk) 304 305 return -ENOMEM; 305 306 306 - mtk->base = devm_ioremap_resource(dev, res); 307 + mtk->base = devm_platform_ioremap_resource(pdev, 0); 307 308 if (IS_ERR(mtk->base)) 308 309 return PTR_ERR(mtk->base); 309 310