Commit cce585ce authored by Mark Brown's avatar Mark Brown

regmap: Fix rbtreee build when not using debugfs

The debugfs functions don't stub themselves out quite so well as might
be desirable so provide functions which do do this stubbing.
Reported-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent bad2ab4b
...@@ -170,6 +170,15 @@ static const struct file_operations rbtree_fops = { ...@@ -170,6 +170,15 @@ static const struct file_operations rbtree_fops = {
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .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 #endif
static int regcache_rbtree_init(struct regmap *map) static int regcache_rbtree_init(struct regmap *map)
...@@ -194,7 +203,7 @@ static int regcache_rbtree_init(struct regmap *map) ...@@ -194,7 +203,7 @@ static int regcache_rbtree_init(struct regmap *map)
goto err; goto err;
} }
debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops); rbtree_debugfs_init(map);
return 0; return 0;
......
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