The cache_only and cache_bypass debugfs entries are expected
to be writable by user-side but are set to read-only permissions.
This is only working accidentally because debugfs doesn't currently
honour the read-only bit.

Signed-off-by: Richard Fitzgerald <[email protected]>
---
 drivers/base/regmap/regmap-debugfs.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c 
b/drivers/base/regmap/regmap-debugfs.c
index 5799a0b..a48579e 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -530,12 +530,12 @@ void regmap_debugfs_init(struct regmap *map, const char 
*name)
        }
 
        if (map->cache_type) {
-               debugfs_create_bool("cache_only", 0400, map->debugfs,
-                                   &map->cache_only);
-               debugfs_create_bool("cache_dirty", 0400, map->debugfs,
-                                   &map->cache_dirty);
-               debugfs_create_bool("cache_bypass", 0400, map->debugfs,
-                                   &map->cache_bypass);
+               debugfs_create_bool("cache_only", S_IRUGO | S_IWUSR,
+                                   map->debugfs, &map->cache_only);
+               debugfs_create_bool("cache_dirty", S_IRUGO,
+                                   map->debugfs, &map->cache_dirty);
+               debugfs_create_bool("cache_bypass", S_IRUGO | S_IWUSR,
+                                   map->debugfs, &map->cache_bypass);
        }
 
        next = rb_first(&map->range_tree);
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to