mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user