aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mt7621.c
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2019-03-11 19:54:59 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-05 00:04:27 +0700
commit92d718fd47749ed79a3823947690dede1fd673cc (patch)
treef3a0ab8f70cd26a6bb3448a753f03ea2dd4d5eb9 /drivers/gpio/gpio-mt7621.c
parentdrivers: gpio: mb86s7x: use devm_platform_ioremap_resource() (diff)
downloadlinux-dev-92d718fd47749ed79a3823947690dede1fd673cc.tar.xz
linux-dev-92d718fd47749ed79a3823947690dede1fd673cc.zip
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>
Diffstat (limited to 'drivers/gpio/gpio-mt7621.c')
-rw-r--r--drivers/gpio/gpio-mt7621.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index 74401e0adb29..79654fb2e50f 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);