diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2013-03-11 17:27:02 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-12 09:52:02 -0700 |
commit | 5d05e0b8506e4ff27a23af6b552ab646192e2260 (patch) | |
tree | 1ca04010e460731823fc17ce7696276667c1cc6f | |
parent | 2b44022a4cb95795c72bbda12ef1bd66a30fb3b5 (diff) |
regmap: Initialize `map->debugfs' before regcache
commit c6432ea9cc043994d5b7dcb3ad86a087777cb40c upstream.
In the rbtree code we are exposing statistics relating to the
number of nodes/registers of the rbtree cache for each of the
devices. Ensure that `map->debugfs' has been initialized before
we attempt to initialize the debugfs entry for the rbtree cache.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/base/regmap/regmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index f00b059c057a..ab3a0202675a 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -662,12 +662,12 @@ struct regmap *regmap_init(struct device *dev, } } + regmap_debugfs_init(map, config->name); + ret = regcache_init(map, config); if (ret != 0) goto err_range; - regmap_debugfs_init(map, config->name); - /* Add a devres resource for dev_get_regmap() */ m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL); if (!m) { |