mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
mfd: ab3100: world-writable debugfs *_priv files
Don't allow everybody to change device hardware registers. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
90550d1903
commit
f8a0697722
@ -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;
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user