Skip to content

Commit

Permalink
drivers: gpio: mt7621: use devm_platform_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Enrico Weigelt, metux IT consult authored and Linus Walleij committed Apr 4, 2019
1 parent 329e23f commit 92d718f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpio/gpio-mt7621.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit 92d718f

Please sign in to comment.