Commit 94ef3297 authored by Michael Walle's avatar Michael Walle Committed by Linus Walleij

pinctrl: ocelot: fix confops resource index

Prior to commit ad96111e ("pinctrl: ocelot: combine get resource and
ioremap into single call") the resource index was 1, now it is 0. But 0
is the base region for the pinctrl block. Fix it.
I noticed this because there was an error that the memory region was
ioremapped twice.

Fixes: ad96111e ("pinctrl: ocelot: combine get resource and ioremap into single call")
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarColin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/20220216082020.981797-1-michael@walle.ccSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1b945334
......@@ -1892,7 +1892,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
.max_register = 32,
};
base = devm_platform_ioremap_resource(pdev, 0);
base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(base)) {
dev_dbg(&pdev->dev, "Failed to ioremap config registers (no extended pinconf)\n");
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment