clk: fix regmap duplicate [1/1]

PD#SWPL-134344

Problem:
there is warning when call meson_clk_regmap_resource twice

Solution:
name for clkc_regmap_config

Verify:
t5d

Change-Id: I645637aa2b67544684a9e3e352030f91ea7ce58f
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
This commit is contained in:
Jian Hu
2023-08-08 05:28:58 +00:00
committed by Luan Yuan
parent d0140095f4
commit ed73ec79b9
+4
View File
@@ -240,11 +240,15 @@ struct regmap *meson_clk_regmap_resource(struct platform_device *pdev, struct de
unsigned int index)
{
void __iomem *base;
struct device_node *node = dev->of_node;
base = devm_platform_ioremap_resource(pdev, index);
if (IS_ERR(base))
return ERR_CAST(base);
clkc_regmap_config.name = devm_kasprintf(dev, GFP_KERNEL,
"%s-%d", node->name, index);
return devm_regmap_init_mmio(dev, base, &clkc_regmap_config);
}
EXPORT_SYMBOL_GPL(meson_clk_regmap_resource);