Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8a06977 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Samuel Ortiz
Browse files

mfd: ab3100: world-writable debugfs *_priv files



Don't allow everybody to change device hardware registers.

Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Acked-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 90550d19
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;