Skip to content

Commit

Permalink
ASoC: wcd9xxx: restrict debugfs permission
Browse files Browse the repository at this point in the history
Remove read permission for debugfs reg dump node
for group and users to not allow reading of wcd9xxx
registers.

CRs-fixed: 2113240
Bug: 62464339
Change-Id: I73a22e140446828e694fdc95fde7ac4e051c9548
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
  • Loading branch information
Karthikeyan Mani authored and pattjin committed Nov 7, 2017
1 parent 4ff6e50 commit c397e14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/mfd/wcd9xxx-core.c
Expand Up @@ -1399,19 +1399,19 @@ static int wcd9xxx_slim_probe(struct slim_device *slim)
("wcd9xxx_core", 0);
if (!IS_ERR(debugfs_wcd9xxx_dent)) {
debugfs_peek = debugfs_create_file("slimslave_peek",
S_IFREG | S_IRUGO, debugfs_wcd9xxx_dent,
S_IFREG | S_IRUSR, debugfs_wcd9xxx_dent,
(void *) "slimslave_peek", &codec_debug_ops);

debugfs_poke = debugfs_create_file("slimslave_poke",
S_IFREG | S_IRUGO, debugfs_wcd9xxx_dent,
S_IFREG | S_IRUSR, debugfs_wcd9xxx_dent,
(void *) "slimslave_poke", &codec_debug_ops);

debugfs_power_state = debugfs_create_file("power_state",
S_IFREG | S_IRUGO, debugfs_wcd9xxx_dent,
S_IFREG | S_IRUSR, debugfs_wcd9xxx_dent,
(void *) "power_state", &codec_debug_ops);

debugfs_reg_dump = debugfs_create_file("slimslave_reg_dump",
S_IFREG | S_IRUGO, debugfs_wcd9xxx_dent,
S_IFREG | S_IRUSR, debugfs_wcd9xxx_dent,
(void *) "slimslave_reg_dump", &codec_debug_ops);
}
#endif
Expand Down

0 comments on commit c397e14

Please sign in to comment.