Skip to content

Commit

Permalink
Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Sep 29, 2014
2 parents 25a9487 + 18c0301 commit 18a64d8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 18a64d8

Please sign in to comment.