[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1321962813-18106-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Tue, 22 Nov 2011 11:53:33 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Uwe Kleine-K??nig <u.kleine-koenig@...gutronix.de>,
linux-kernel@...r.kernel.org
Cc: patches@...nsource.wolfsonmicro.com,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH] 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@...gutronix.de>
Signed-off-by: Mark Brown <broonie@...nsource.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists