diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index 7767cbb8d15a..32620c4f1683 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c @@ -170,6 +170,15 @@ static const struct file_operations rbtree_fops = { .llseek = seq_lseek, .release = single_release, }; + +static void rbtree_debugfs_init(struct regmap *map) +{ + debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops); +} +#else +static void rbtree_debugfs_init(struct regmap *map) +{ +} #endif static int regcache_rbtree_init(struct regmap *map) @@ -194,7 +203,7 @@ static int regcache_rbtree_init(struct regmap *map) goto err; } - debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops); + rbtree_debugfs_init(map); return 0;