pinctrl: ocelot: fix confops resource index
Subsystems (2)
PATCH 1/1 pinctrl: ocelot: fix confops resource index
Prior to commit ad96111e658a ("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.
--- drivers/pinctrl/pinctrl-ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-ocelot.c +1 -1
@@ -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 ;
Signature · 1 line
2.30.2
Hi Michael,
Quoted 5 lines · Michael Walle
Prior to commit
ad96111e658a("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.
My apologies... I missed this and didn't have access to hardware to test. Thanks for the fix.
Quoted 23 lines
Fixes ad96111e658a ("pinctrl: ocelot: combine get resource and ioremap into single call")Signed-off-by Michael Walle <[email protected]>--- drivers/pinctrl/pinctrl-ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/pinctrl-ocelot.c +1
-1@@ -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 ;Signature · 1 line
2.30.2
Quoted 8 lines · Michael Walle
Prior to commit
ad96111e658a("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 ad96111e658a ("pinctrl: ocelot: combine get resource and ioremap into single call")Signed-off-by Michael Walle <[email protected]>
Patch applied!
Yours,
Linus Walleij