2019-08-29 14:16:14

by George McCollister

[permalink] [raw]
Subject: [PATCH] net: dsa: microchip: fill regmap_config name

Use the register value width as the regmap_config name to prevent the
following error when the second and third regmap_configs are
initialized.
"debugfs: Directory '${bus-id}' with parent 'regmap' already present!"

Signed-off-by: George McCollister <[email protected]>
---
drivers/net/dsa/microchip/ksz_common.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index ee7096d8af07..72ec250b9540 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -128,6 +128,7 @@ static inline void ksz_pwrite32(struct ksz_device *dev, int port, int offset,

#define KSZ_REGMAP_ENTRY(width, swp, regbits, regpad, regalign) \
{ \
+ .name = #width, \
.val_bits = (width), \
.reg_stride = (width) / 8, \
.reg_bits = (regbits) + (regalign), \
--
2.11.0


2019-08-29 18:27:18

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH] net: dsa: microchip: fill regmap_config name

On 8/29/19 4:14 PM, George McCollister wrote:
> Use the register value width as the regmap_config name to prevent the
> following error when the second and third regmap_configs are
> initialized.
> "debugfs: Directory '${bus-id}' with parent 'regmap' already present!"
>
> Signed-off-by: George McCollister <[email protected]>

Reviewed-by: Marek Vasut <[email protected]>

2019-08-31 20:21:56

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: dsa: microchip: fill regmap_config name

From: George McCollister <[email protected]>
Date: Thu, 29 Aug 2019 09:14:41 -0500

> Use the register value width as the regmap_config name to prevent the
> following error when the second and third regmap_configs are
> initialized.
> "debugfs: Directory '${bus-id}' with parent 'regmap' already present!"
>
> Signed-off-by: George McCollister <[email protected]>

Applied.