aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-22 06:33:31 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-22 06:43:01 -0500
commitcce585ce1ebd5307c9709e24758d5eb8a1e087a7 (patch)
tree34afe74754a9714610e39a89f5b85645cf1dded2 /drivers/base
parentbad2ab4b6d938482c2b0bdcf80a8d14dbef4e8f5 (diff)
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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-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