From: Enrico Weigelt, metux IT consult Date: Mon, 11 Mar 2019 18:54:59 +0000 (+0100) Subject: drivers: gpio: mt7621: use devm_platform_ioremap_resource() X-Git-Tag: v5.4-rc1~1012^2~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92d718fd47749ed79a3823947690dede1fd673cc;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Matthias Brugger Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c index 74401e0..79654fb 100644 --- a/drivers/gpio/gpio-mt7621.c +++ b/drivers/gpio/gpio-mt7621.c @@ -293,7 +293,6 @@ mediatek_gpio_bank_probe(struct device *dev, static int mediatek_gpio_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct mtk *mtk; @@ -304,7 +303,7 @@ mediatek_gpio_probe(struct platform_device *pdev) if (!mtk) return -ENOMEM; - mtk->base = devm_ioremap_resource(dev, res); + mtk->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mtk->base)) return PTR_ERR(mtk->base);