mfd: ab3500: world-writable debugfs register-* files

Don't allow everybody to interact with 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:
Vasiliy Kulikov 2011-02-04 15:23:39 +03:00 committed by Samuel Ortiz
parent f8a0697722
commit 90c861c2a8

View File

@ -1053,17 +1053,17 @@ static inline void ab3550_setup_debugfs(struct ab3550 *ab)
goto exit_destroy_dir; goto exit_destroy_dir;
ab3550_bank_file = debugfs_create_file("register-bank", ab3550_bank_file = debugfs_create_file("register-bank",
(S_IRUGO | S_IWUGO), ab3550_dir, ab, &ab3550_bank_fops); (S_IRUGO | S_IWUSR), ab3550_dir, ab, &ab3550_bank_fops);
if (!ab3550_bank_file) if (!ab3550_bank_file)
goto exit_destroy_reg; goto exit_destroy_reg;
ab3550_address_file = debugfs_create_file("register-address", ab3550_address_file = debugfs_create_file("register-address",
(S_IRUGO | S_IWUGO), ab3550_dir, ab, &ab3550_address_fops); (S_IRUGO | S_IWUSR), ab3550_dir, ab, &ab3550_address_fops);
if (!ab3550_address_file) if (!ab3550_address_file)
goto exit_destroy_bank; goto exit_destroy_bank;
ab3550_val_file = debugfs_create_file("register-value", ab3550_val_file = debugfs_create_file("register-value",
(S_IRUGO | S_IWUGO), ab3550_dir, ab, &ab3550_val_fops); (S_IRUGO | S_IWUSR), ab3550_dir, ab, &ab3550_val_fops);
if (!ab3550_val_file) if (!ab3550_val_file)
goto exit_destroy_address; goto exit_destroy_address;