aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/regmap/regcache-rbtree.c11
1 files changed, 10 insertions, 1 deletions
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 = {
170 .llseek = seq_lseek, 170 .llseek = seq_lseek,
171 .release = single_release, 171 .release = single_release,
172}; 172};
173
174static void rbtree_debugfs_init(struct regmap *map)
175{
176 debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops);
177}
178#else
179static void rbtree_debugfs_init(struct regmap *map)
180{
181}
173#endif 182#endif
174 183
175static int regcache_rbtree_init(struct regmap *map) 184static int regcache_rbtree_init(struct regmap *map)
@@ -194,7 +203,7 @@ static int regcache_rbtree_init(struct regmap *map)
194 goto err; 203 goto err;
195 } 204 }
196 205
197 debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops); 206 rbtree_debugfs_init(map);
198 207
199 return 0; 208 return 0;
200 209