summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-09-29 20:49:40 +0100
committerMark Brown <broonie@kernel.org>2014-09-29 20:49:40 +0100
commit18a64d844c0e98ad00f735f5ea6a3affb6b76639 (patch)
treea76fef42627f196b39759a40ad64645d76529178 /drivers/base
parent25a948778759ad87d7b005522248cec97eaaa4c5 (diff)
parent18c0301f9898feaac38135b2cea476bb606830e3 (diff)
downloadlinux-18a64d844c0e98ad00f735f5ea6a3affb6b76639.tar.gz
linux-18a64d844c0e98ad00f735f5ea6a3affb6b76639.tar.bz2
linux-18a64d844c0e98ad00f735f5ea6a3affb6b76639.zip
Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap-debugfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 0c94b661c16f..5799a0b9e6cc 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -473,6 +473,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
{
struct rb_node *next;
struct regmap_range_node *range_node;
+ const char *devname = "dummy";
/* If we don't have the debugfs root yet, postpone init */
if (!regmap_debugfs_root) {
@@ -491,12 +492,15 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
INIT_LIST_HEAD(&map->debugfs_off_cache);
mutex_init(&map->cache_lock);
+ if (map->dev)
+ devname = dev_name(map->dev);
+
if (name) {
map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
- dev_name(map->dev), name);
+ devname, name);
name = map->debugfs_name;
} else {
- name = dev_name(map->dev);
+ name = devname;
}
map->debugfs = debugfs_create_dir(name, regmap_debugfs_root);