aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2011-03-22 19:30:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 20:43:59 -0400
commit67d1da79b25c05d9a38b820bb5b5d89c91070ab2 (patch)
treed476f6dec88b93118848a6ad89c96d3bcbc7b057 /drivers/leds
parent1baf0eb3975ab56e29d57984b7bd6c9cd360dbf3 (diff)
drivers/leds/leds-lp5521.c: world-writable sysfs engine* 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')
-rw-r--r--drivers/leds/leds-lp5521.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 80a3ae3c00b9..c0cff64a1ae6 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -534,7 +534,7 @@ static ssize_t lp5521_selftest(struct device *dev,
534} 534}
535 535
536/* led class device attributes */ 536/* led class device attributes */
537static DEVICE_ATTR(led_current, S_IRUGO | S_IWUGO, show_current, store_current); 537static DEVICE_ATTR(led_current, S_IRUGO | S_IWUSR, show_current, store_current);
538static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL); 538static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL);
539 539
540static struct attribute *lp5521_led_attributes[] = { 540static struct attribute *lp5521_led_attributes[] = {
@@ -548,15 +548,15 @@ static struct attribute_group lp5521_led_attribute_group = {
548}; 548};
549 549
550/* device attributes */ 550/* device attributes */
551static DEVICE_ATTR(engine1_mode, S_IRUGO | S_IWUGO, 551static DEVICE_ATTR(engine1_mode, S_IRUGO | S_IWUSR,
552 show_engine1_mode, store_engine1_mode); 552 show_engine1_mode, store_engine1_mode);
553static DEVICE_ATTR(engine2_mode, S_IRUGO | S_IWUGO, 553static DEVICE_ATTR(engine2_mode, S_IRUGO | S_IWUSR,
554 show_engine2_mode, store_engine2_mode); 554 show_engine2_mode, store_engine2_mode);
555static DEVICE_ATTR(engine3_mode, S_IRUGO | S_IWUGO, 555static DEVICE_ATTR(engine3_mode, S_IRUGO | S_IWUSR,
556 show_engine3_mode, store_engine3_mode); 556 show_engine3_mode, store_engine3_mode);
557static DEVICE_ATTR(engine1_load, S_IWUGO, NULL, store_engine1_load); 557static DEVICE_ATTR(engine1_load, S_IWUSR, NULL, store_engine1_load);
558static DEVICE_ATTR(engine2_load, S_IWUGO, NULL, store_engine2_load); 558static DEVICE_ATTR(engine2_load, S_IWUSR, NULL, store_engine2_load);
559static DEVICE_ATTR(engine3_load, S_IWUGO, NULL, store_engine3_load); 559static DEVICE_ATTR(engine3_load, S_IWUSR, NULL, store_engine3_load);
560static DEVICE_ATTR(selftest, S_IRUGO, lp5521_selftest, NULL); 560static DEVICE_ATTR(selftest, S_IRUGO, lp5521_selftest, NULL);
561 561
562static struct attribute *lp5521_attributes[] = { 562static struct attribute *lp5521_attributes[] = {