Merge branches 'regmap-core', 'regmap-mmio' and 'regmap-naming' into regmap-stride
This commit is contained in:
@@ -242,10 +242,17 @@ static const struct file_operations regmap_access_fops = {
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
void regmap_debugfs_init(struct regmap *map)
|
||||
void regmap_debugfs_init(struct regmap *map, const char *name)
|
||||
{
|
||||
map->debugfs = debugfs_create_dir(dev_name(map->dev),
|
||||
regmap_debugfs_root);
|
||||
if (name) {
|
||||
map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
|
||||
dev_name(map->dev), name);
|
||||
name = map->debugfs_name;
|
||||
} else {
|
||||
name = dev_name(map->dev);
|
||||
}
|
||||
|
||||
map->debugfs = debugfs_create_dir(name, regmap_debugfs_root);
|
||||
if (!map->debugfs) {
|
||||
dev_warn(map->dev, "Failed to create debugfs directory\n");
|
||||
return;
|
||||
@@ -274,6 +281,7 @@ void regmap_debugfs_init(struct regmap *map)
|
||||
void regmap_debugfs_exit(struct regmap *map)
|
||||
{
|
||||
debugfs_remove_recursive(map->debugfs);
|
||||
kfree(map->debugfs_name);
|
||||
}
|
||||
|
||||
void regmap_debugfs_initcall(void)
|
||||
|
||||
Reference in New Issue
Block a user