diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2019-03-11 14:55:15 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-04-04 13:04:28 -0400 |
commit | 83fa76b65cd2008ca0c657830cdc2a18699672b7 (patch) | |
tree | d945198e7477d7120eb4cd6d1742840a1d4861d1 /drivers/gpio/gpio-uniphier.c | |
parent | f7a6e467eaf1e188c58da741e046e28a178cf274 (diff) |
drivers: gpio: uniphier: 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>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-uniphier.c')
-rw-r--r-- | drivers/gpio/gpio-uniphier.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index 0f662b297a95..93cdcc41e9fb 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c | |||
@@ -346,7 +346,6 @@ static int uniphier_gpio_probe(struct platform_device *pdev) | |||
346 | struct uniphier_gpio_priv *priv; | 346 | struct uniphier_gpio_priv *priv; |
347 | struct gpio_chip *chip; | 347 | struct gpio_chip *chip; |
348 | struct irq_chip *irq_chip; | 348 | struct irq_chip *irq_chip; |
349 | struct resource *regs; | ||
350 | unsigned int nregs; | 349 | unsigned int nregs; |
351 | u32 ngpios; | 350 | u32 ngpios; |
352 | int ret; | 351 | int ret; |
@@ -370,8 +369,7 @@ static int uniphier_gpio_probe(struct platform_device *pdev) | |||
370 | if (!priv) | 369 | if (!priv) |
371 | return -ENOMEM; | 370 | return -ENOMEM; |
372 | 371 | ||
373 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 372 | priv->regs = devm_platform_ioremap_resource(pdev, 0); |
374 | priv->regs = devm_ioremap_resource(dev, regs); | ||
375 | if (IS_ERR(priv->regs)) | 373 | if (IS_ERR(priv->regs)) |
376 | return PTR_ERR(priv->regs); | 374 | return PTR_ERR(priv->regs); |
377 | 375 | ||