Commit 18a64d84 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus

parents 25a94877 18c0301f
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment