Skip to content

Commit

Permalink
regmap: Initialize `map->debugfs' before regcache
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Mar 12, 2013
1 parent f6161aa commit c6432ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,12 +710,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) {
Expand Down

0 comments on commit c6432ea

Please sign in to comment.