mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regmap: Fix rbtreee build when not using debugfs
@ 2011-11-22 11:53 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2011-11-22 11:53 UTC (permalink / raw)
  To: Uwe Kleine-K??nig, linux-kernel; +Cc: patches, Mark Brown

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>
---
 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 7767cbb..32620c4 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;
 
-- 
1.7.7.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-22 11:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-22 11:53 [PATCH] regmap: Fix rbtreee build when not using debugfs Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®