linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: syscon: Fix syscon name for device tree
@ 2019-01-08  0:05 Tony Lindgren
  2019-01-08  0:15 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2019-01-08  0:05 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, linux-omap, Jeffy Chen

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.chen@rock-chips.com>
Signed-off-by: Tony Lindgren <tony@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-08 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08  0:05 [PATCH] mfd: syscon: Fix syscon name for device tree Tony Lindgren
2019-01-08  0:15 ` Tony Lindgren
2019-01-08  3:16   ` JeffyChen
2019-01-08 15:38     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).