Skip to content

Commit

Permalink
mfd: ab3100: world-writable debugfs *_priv files
Browse files Browse the repository at this point in the history
Don't allow everybody to change device hardware registers.

Signed-off-by: Vasiliy Kulikov <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
segoon authored and Samuel Ortiz committed Mar 23, 2011
1 parent 90550d1 commit f8a0697
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mfd/ab3100-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ static void ab3100_setup_debugfs(struct ab3100 *ab3100)
ab3100_get_priv.ab3100 = ab3100;
ab3100_get_priv.mode = false;
ab3100_get_reg_file = debugfs_create_file("get_reg",
S_IWUGO, ab3100_dir, &ab3100_get_priv,
S_IWUSR, ab3100_dir, &ab3100_get_priv,
&ab3100_get_set_reg_fops);
if (!ab3100_get_reg_file) {
err = -ENOMEM;
Expand All @@ -623,7 +623,7 @@ static void ab3100_setup_debugfs(struct ab3100 *ab3100)
ab3100_set_priv.ab3100 = ab3100;
ab3100_set_priv.mode = true;
ab3100_set_reg_file = debugfs_create_file("set_reg",
S_IWUGO, ab3100_dir, &ab3100_set_priv,
S_IWUSR, ab3100_dir, &ab3100_set_priv,
&ab3100_get_set_reg_fops);
if (!ab3100_set_reg_file) {
err = -ENOMEM;
Expand Down

0 comments on commit f8a0697

Please sign in to comment.