regmap: Do debugfs init before cache init
Mark Brown [Mon, 21 Nov 2011 19:05:13 +0000 (19:05 +0000)]
This allows caches to add custom debugfs files.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 052d2cd123e7e36ce54558ac5af0360de2343b2b)

Change-Id: I5bba9172f5f295d4d98be211c161238aa0066a4b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/87567

drivers/base/regmap/regmap.c

index 7766d94..0104511 100644 (file)
@@ -241,12 +241,12 @@ struct regmap *regmap_init(struct device *dev,
                goto err_map;
        }
 
+       regmap_debugfs_init(map);
+
        ret = regcache_init(map, config);
        if (ret < 0)
                goto err_free_workbuf;
 
-       regmap_debugfs_init(map);
-
        return map;
 
 err_free_workbuf: