diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2019-03-11 19:55:00 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-04-05 00:04:27 +0700 |
commit | dc02a0cacb6cfe37ca7c8590e46c1a3c985c3092 (patch) | |
tree | 499881fe6ea21635b242160ac895d639540cbad7 /drivers/gpio/gpio-mvebu.c | |
parent | 92d718fd47749ed79a3823947690dede1fd673cc (diff) | |
download | linux-dc02a0cacb6cfe37ca7c8590e46c1a3c985c3092.tar.bz2 |
drivers: gpio: mvebu: 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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mvebu.c')
-rw-r--r-- | drivers/gpio/gpio-mvebu.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index f97ed32b8beb..059094ac44cb 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -1038,11 +1038,9 @@ static const struct regmap_config mvebu_gpio_regmap_config = { static int mvebu_gpio_probe_raw(struct platform_device *pdev, struct mvebu_gpio_chip *mvchip) { - struct resource *res; void __iomem *base; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); @@ -1062,8 +1060,7 @@ static int mvebu_gpio_probe_raw(struct platform_device *pdev, * per-CPU registers */ if (mvchip->soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(base)) return PTR_ERR(base); |