diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2011-03-22 19:30:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:43:59 -0400 |
commit | ccd7510fd8dea5b4b2af87fb2aef2ebd6b23b76b (patch) | |
tree | cd71d20ddf832d08e60bd3f62694ba7fc224dde1 /drivers/leds/leds-lp5523.c | |
parent | 67d1da79b25c05d9a38b820bb5b5d89c91070ab2 (diff) |
drivers/leds/leds-lp5523.c: world-writable engine* sysfs files
Don't allow everybody to change LED settings.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds/leds-lp5523.c')
-rw-r--r-- | drivers/leds/leds-lp5523.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index d0c4068ecddd..e19fed25f137 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c | |||
@@ -713,7 +713,7 @@ static ssize_t store_current(struct device *dev, | |||
713 | } | 713 | } |
714 | 714 | ||
715 | /* led class device attributes */ | 715 | /* led class device attributes */ |
716 | static DEVICE_ATTR(led_current, S_IRUGO | S_IWUGO, show_current, store_current); | 716 | static DEVICE_ATTR(led_current, S_IRUGO | S_IWUSR, show_current, store_current); |
717 | static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL); | 717 | static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL); |
718 | 718 | ||
719 | static struct attribute *lp5523_led_attributes[] = { | 719 | static struct attribute *lp5523_led_attributes[] = { |
@@ -727,21 +727,21 @@ static struct attribute_group lp5523_led_attribute_group = { | |||
727 | }; | 727 | }; |
728 | 728 | ||
729 | /* device attributes */ | 729 | /* device attributes */ |
730 | static DEVICE_ATTR(engine1_mode, S_IRUGO | S_IWUGO, | 730 | static DEVICE_ATTR(engine1_mode, S_IRUGO | S_IWUSR, |
731 | show_engine1_mode, store_engine1_mode); | 731 | show_engine1_mode, store_engine1_mode); |
732 | static DEVICE_ATTR(engine2_mode, S_IRUGO | S_IWUGO, | 732 | static DEVICE_ATTR(engine2_mode, S_IRUGO | S_IWUSR, |
733 | show_engine2_mode, store_engine2_mode); | 733 | show_engine2_mode, store_engine2_mode); |
734 | static DEVICE_ATTR(engine3_mode, S_IRUGO | S_IWUGO, | 734 | static DEVICE_ATTR(engine3_mode, S_IRUGO | S_IWUSR, |
735 | show_engine3_mode, store_engine3_mode); | 735 | show_engine3_mode, store_engine3_mode); |
736 | static DEVICE_ATTR(engine1_leds, S_IRUGO | S_IWUGO, | 736 | static DEVICE_ATTR(engine1_leds, S_IRUGO | S_IWUSR, |
737 | show_engine1_leds, store_engine1_leds); | 737 | show_engine1_leds, store_engine1_leds); |
738 | static DEVICE_ATTR(engine2_leds, S_IRUGO | S_IWUGO, | 738 | static DEVICE_ATTR(engine2_leds, S_IRUGO | S_IWUSR, |
739 | show_engine2_leds, store_engine2_leds); | 739 | show_engine2_leds, store_engine2_leds); |
740 | static DEVICE_ATTR(engine3_leds, S_IRUGO | S_IWUGO, | 740 | static DEVICE_ATTR(engine3_leds, S_IRUGO | S_IWUSR, |
741 | show_engine3_leds, store_engine3_leds); | 741 | show_engine3_leds, store_engine3_leds); |
742 | static DEVICE_ATTR(engine1_load, S_IWUGO, NULL, store_engine1_load); | 742 | static DEVICE_ATTR(engine1_load, S_IWUSR, NULL, store_engine1_load); |
743 | static DEVICE_ATTR(engine2_load, S_IWUGO, NULL, store_engine2_load); | 743 | static DEVICE_ATTR(engine2_load, S_IWUSR, NULL, store_engine2_load); |
744 | static DEVICE_ATTR(engine3_load, S_IWUGO, NULL, store_engine3_load); | 744 | static DEVICE_ATTR(engine3_load, S_IWUSR, NULL, store_engine3_load); |
745 | static DEVICE_ATTR(selftest, S_IRUGO, lp5523_selftest, NULL); | 745 | static DEVICE_ATTR(selftest, S_IRUGO, lp5523_selftest, NULL); |
746 | 746 | ||
747 | static struct attribute *lp5523_attributes[] = { | 747 | static struct attribute *lp5523_attributes[] = { |