diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 875e3f319d7b5f3ad72306a5411cafbfdef6663b..25cb62e21e50a7416d9ec9c232e6998be771728e 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1761,7 +1761,6 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct ocelot_pinctrl *info; void __iomem *base; - struct resource *res; int ret; struct regmap_config regmap_config = { .reg_bits = 32, @@ -1794,8 +1793,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) /* Pinconf registers */ if (info->desc->confops) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) dev_dbg(dev, "Failed to ioremap config registers (no extended pinconf)\n"); else