Skip to contentSkip to conversation

pinctrl: ocelot: fix duplicate debugfs entry

PATCH In review Michael Walle 3 participants 3 messages Feb 16, 2022 – Mar 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: ocelot: fix duplicate debugfs entry

This driver can have up to two regmaps. If the second one is registered its debugfs entry will have the same name as the first one and the following error will be printed:

[    2.242568] debugfs: Directory 'e2004064.pinctrl' with parent 'regmap' already present!

Give the second regmap a name to avoid this.

Fixes 076d9e71bcf8 ("pinctrl: ocelot: convert pinctrl to regmap")
---
 drivers/pinctrl/pinctrl-ocelot.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/pinctrl-ocelot.c +1 -0
index a859fbcb09af..35b213de1af8 100644
@@ -1890,6 +1890,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
 		.val_bits = 32,
 		.reg_stride = 4,
 		.max_register = 32,
+		.name = "pincfg",
 	};
 
 	base = devm_platform_ioremap_resource(pdev, 1);
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 29 lines · Michael Walle

This driver can have up to two regmaps. If the second one is registered its debugfs entry will have the same name as the first one and the following error will be printed:

[    2.242568] debugfs: Directory 'e2004064.pinctrl' with parent 'regmap' already present!

Give the second regmap a name to avoid this.

Fixes 076d9e71bcf8 ("pinctrl: ocelot: convert pinctrl to regmap")
---
 drivers/pinctrl/pinctrl-ocelot.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/pinctrl-ocelot.c +1 -0
index a859fbcb09af..35b213de1af8 100644
@@ -1890,6 +1890,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
 		.val_bits = 32,
 		.reg_stride = 4,
 		.max_register = 32,
+		.name = "pincfg",
 	};
 
 	base = devm_platform_ioremap_resource(pdev, 1);
Signature · 1 line
2.30.2
#2 lore raw
In reply to Michael Walle
Quoted 10 lines · Michael Walle

This driver can have up to two regmaps. If the second one is registered its debugfs entry will have the same name as the first one and the following error will be printed:

[    2.242568] debugfs: Directory 'e2004064.pinctrl' with parent 'regmap' already present!

Give the second regmap a name to avoid this.

Fixes 076d9e71bcf8 ("pinctrl: ocelot: convert pinctrl to regmap")

Patch applied!

Yours,
Linus Walleij