Skip to content

Commit 0f8946a

Browse files
mwallekuba-moo
authored andcommitted
net: mdio: mscc-miim: 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: [ 3.833521] debugfs: Directory 'e200413c.mdio' with parent 'regmap' already present! Give the second regmap a name to avoid this. Fixes: a27a762 ("net: mdio: mscc-miim: convert to a regmap implementation") Signed-off-by: Michael Walle <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 15d7039 commit 0f8946a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/net/mdio/mdio-mscc-miim.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ static const struct regmap_config mscc_miim_regmap_config = {
187187
.reg_stride = 4,
188188
};
189189

190+
static const struct regmap_config mscc_miim_phy_regmap_config = {
191+
.reg_bits = 32,
192+
.val_bits = 32,
193+
.reg_stride = 4,
194+
.name = "phy",
195+
};
196+
190197
int mscc_miim_setup(struct device *dev, struct mii_bus **pbus, const char *name,
191198
struct regmap *mii_regmap, int status_offset)
192199
{
@@ -250,7 +257,7 @@ static int mscc_miim_probe(struct platform_device *pdev)
250257
}
251258

252259
phy_regmap = devm_regmap_init_mmio(&pdev->dev, phy_regs,
253-
&mscc_miim_regmap_config);
260+
&mscc_miim_phy_regmap_config);
254261
if (IS_ERR(phy_regmap)) {
255262
dev_err(&pdev->dev, "Unable to create phy register regmap\n");
256263
return PTR_ERR(phy_regmap);

0 commit comments

Comments
 (0)