summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2019-03-11 19:55:00 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-04 19:04:27 +0200
commitdc02a0cacb6cfe37ca7c8590e46c1a3c985c3092 (patch)
tree499881fe6ea21635b242160ac895d639540cbad7
parentdrivers: gpio: mt7621: use devm_platform_ioremap_resource() (diff)
downloadlinux-dc02a0cacb6cfe37ca7c8590e46c1a3c985c3092.tar.xz
linux-dc02a0cacb6cfe37ca7c8590e46c1a3c985c3092.zip
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>
-rw-r--r--drivers/gpio/gpio-mvebu.c7
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);