mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: linux-kernel@vger.kernel.org
Cc: David Lechner <david@lechnology.com>,
	Mark Brown <broonie@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH v2 2/2] regmap: use debugfs even when no device
Date: Mon, 19 Feb 2018 15:43:02 -0600	[thread overview]
Message-ID: <1519076582-7687-3-git-send-email-david@lechnology.com> (raw)
In-Reply-To: <1519076582-7687-1-git-send-email-david@lechnology.com>

This registers regmaps with debugfs even when they do not have an
associated device. For example, this is common for syscon regmaps.

Signed-off-by: David Lechner <david@lechnology.com>
---

v2 changes:
- none

 drivers/base/regmap/regmap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index ee302cc..f5fa1dd 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1116,6 +1116,8 @@ struct regmap *__regmap_init(struct device *dev,
 		ret = regmap_attach_dev(dev, map, config);
 		if (ret != 0)
 			goto err_regcache;
+	} else {
+		regmap_debugfs_init(map, config->name);
 	}
 
 	return map;
-- 
2.7.4

      parent reply	other threads:[~2018-02-19 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 21:43 [PATCH v2 0/2] " David Lechner
2018-02-19 21:43 ` [PATCH v2] regmap: fix NULL pointer dereference in regmap_name_read_file() David Lechner
2018-02-20 12:10   ` Applied "regmap: Allow missing device in regmap_name_read_file()" to the regmap tree Mark Brown
2018-02-19 21:43 ` David Lechner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519076582-7687-3-git-send-email-david@lechnology.com \
    --to=david@lechnology.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome