I'm now seeing the following error on omap5 during boot:

(NULL device *): Failed to create dummy-scm_conf@0 debugfs directory

This is because we have two separate scm_conf syscon regions in the
dts. Let's fix the issue by setting a proper name if syscon is
configured via device tree.

See also related fix for commit 500f9ff518cf ("mfd: syscon: Set name
of regmap_config").

Cc: Jeffy Chen <jeffy.c...@rock-chips.com>
Signed-off-by: Tony Lindgren <t...@atomide.com>
---
 drivers/mfd/syscon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -241,6 +241,8 @@ static int syscon_probe(struct platform_device *pdev)
        syscon_config.max_register = res->end - res->start - 3;
        if (pdata)
                syscon_config.name = pdata->label;
+       else
+               syscon_config.name = dev_name(dev);
        syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config);
        if (IS_ERR(syscon->regmap)) {
                dev_err(dev, "regmap init failed\n");
-- 
2.20.1

Reply via email to