mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
regmap: get rid of redundant debugfs_file_{get,put}()
pointless in ->read()/->write() of file_operations used only via debugfs_create_file() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Link: https://lore.kernel.org/r/20250702211602.GC3406663@ZenIV Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2b4b80cfcf
commit
8009fb751d
|
|
@ -470,10 +470,6 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
|
|||
if (err)
|
||||
return count;
|
||||
|
||||
err = debugfs_file_get(file->f_path.dentry);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
map->lock(map->lock_arg);
|
||||
|
||||
if (new_val && !map->cache_only) {
|
||||
|
|
@ -486,7 +482,6 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
|
|||
map->cache_only = new_val;
|
||||
|
||||
map->unlock(map->lock_arg);
|
||||
debugfs_file_put(file->f_path.dentry);
|
||||
|
||||
if (require_sync) {
|
||||
err = regcache_sync(map);
|
||||
|
|
@ -517,10 +512,6 @@ static ssize_t regmap_cache_bypass_write_file(struct file *file,
|
|||
if (err)
|
||||
return count;
|
||||
|
||||
err = debugfs_file_get(file->f_path.dentry);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
map->lock(map->lock_arg);
|
||||
|
||||
if (new_val && !map->cache_bypass) {
|
||||
|
|
@ -532,7 +523,6 @@ static ssize_t regmap_cache_bypass_write_file(struct file *file,
|
|||
map->cache_bypass = new_val;
|
||||
|
||||
map->unlock(map->lock_arg);
|
||||
debugfs_file_put(file->f_path.dentry);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user