diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2013-03-11 13:27:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-12 14:25:10 -0400 |
commit | c6432ea9cc043994d5b7dcb3ad86a087777cb40c (patch) | |
tree | 753612a8b95236094e854ec265299a9e22b8320d /drivers/base | |
parent | f6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff) |
regmap: Initialize `map->debugfs' before regcache
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>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/base')
-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 3d2367501fd0..50ef277ea4b6 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c | |||
@@ -710,12 +710,12 @@ skip_format_initialization: | |||
710 | } | 710 | } |
711 | } | 711 | } |
712 | 712 | ||
713 | regmap_debugfs_init(map, config->name); | ||
714 | |||
713 | ret = regcache_init(map, config); | 715 | ret = regcache_init(map, config); |
714 | if (ret != 0) | 716 | if (ret != 0) |
715 | goto err_range; | 717 | goto err_range; |
716 | 718 | ||
717 | regmap_debugfs_init(map, config->name); | ||
718 | |||
719 | /* Add a devres resource for dev_get_regmap() */ | 719 | /* Add a devres resource for dev_get_regmap() */ |
720 | m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL); | 720 | m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL); |
721 | if (!m) { | 721 | if (!m) { |