]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
regmap: Initialize `map->debugfs' before regcache
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Mon, 11 Mar 2013 17:27:02 +0000 (17:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Apr 2013 16:52:02 +0000 (09:52 -0700)
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>
drivers/base/regmap/regmap.c

index f00b059c057ad01e4c8b9f05e95676c3c53c0e79..ab3a0202675a4cf7d9ff5c42dfdd47291dc20543 100644 (file)
@@ -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) {