diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-22 11:33:31 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-22 11:43:01 +0000 |
commit | cce585ce1ebd5307c9709e24758d5eb8a1e087a7 (patch) | |
tree | 34afe74754a9714610e39a89f5b85645cf1dded2 /drivers/base/regmap/regcache-rbtree.c | |
parent | bad2ab4b6d938482c2b0bdcf80a8d14dbef4e8f5 (diff) | |
download | lwn-cce585ce1ebd5307c9709e24758d5eb8a1e087a7.tar.gz lwn-cce585ce1ebd5307c9709e24758d5eb8a1e087a7.zip |
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/regmap/regcache-rbtree.c')
-rw-r--r-- | drivers/base/regmap/regcache-rbtree.c | 11 |
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 = { .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; |