2013-03-11 17:27:06

by Dimitris Papastamos

[permalink] [raw]
Subject: [PATCH] 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 <[email protected]>
---
drivers/base/regmap/regmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 3d23675..50ef277 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -710,12 +710,12 @@ skip_format_initialization:
}
}

+ 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) {
--
1.8.1.5


2013-03-12 18:25:30

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] regmap: Initialize `map->debugfs' before regcache

On Mon, Mar 11, 2013 at 05:27:02PM +0000, Dimitris Papastamos wrote:
> 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.

Applied, thanks.


Attachments:
(No filename) (349.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments