Commit cce585ce1ebd5307c9709e24758d5eb8a1e087a7
1 parent
bad2ab4b6d
Exists in
master
and in
6 other branches
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>
Showing 1 changed file with 10 additions and 1 deletions Side-by-side Diff
drivers/base/regmap/regcache-rbtree.c
... | ... | @@ -170,6 +170,15 @@ |
170 | 170 | .llseek = seq_lseek, |
171 | 171 | .release = single_release, |
172 | 172 | }; |
173 | + | |
174 | +static void rbtree_debugfs_init(struct regmap *map) | |
175 | +{ | |
176 | + debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops); | |
177 | +} | |
178 | +#else | |
179 | +static void rbtree_debugfs_init(struct regmap *map) | |
180 | +{ | |
181 | +} | |
173 | 182 | #endif |
174 | 183 | |
175 | 184 | static int regcache_rbtree_init(struct regmap *map) |
... | ... | @@ -194,7 +203,7 @@ |
194 | 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 | 208 | return 0; |
200 | 209 |