lkml.org 
[lkml]   [2022]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH v2] regmap: debugfs: Free debugfs_name buffer after usage
On Fri, Jan 7, 2022 at 10:27 AM Mark Brown <broonie@kernel.org> wrote:

> I would have expected this to be prior to the call to _init() rather
> than actually in the call to _init() but OTOH this should work fine so
> meh.

Yes, I can call it prior to _init() as you suggested:

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 21a0c2562ec0..f7811641ed5a 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -647,6 +647,7 @@ int regmap_attach_dev(struct device *dev, struct
regmap *map,
if (ret)
return ret;

+ regmap_debugfs_exit(map);
regmap_debugfs_init(map);

/* Add a devres resource for dev_get_regmap() */
Will send a patch shortly.

Thanks

\
 
 \ /
  Last update: 2022-01-07 15:49    [W:0.980 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site