Commit 67d1da79 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Linus Torvalds

drivers/leds/leds-lp5521.c: world-writable sysfs engine* files

Don't allow everybody to change LED settings.
Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1baf0eb3
...@@ -534,7 +534,7 @@ static ssize_t lp5521_selftest(struct device *dev, ...@@ -534,7 +534,7 @@ static ssize_t lp5521_selftest(struct device *dev,
} }
/* led class device attributes */ /* led class device attributes */
static DEVICE_ATTR(led_current, S_IRUGO | S_IWUGO, show_current, store_current); static DEVICE_ATTR(led_current, S_IRUGO | S_IWUSR, show_current, store_current);
static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL); static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL);
static struct attribute *lp5521_led_attributes[] = { static struct attribute *lp5521_led_attributes[] = {
...@@ -548,15 +548,15 @@ static struct attribute_group lp5521_led_attribute_group = { ...@@ -548,15 +548,15 @@ static struct attribute_group lp5521_led_attribute_group = {
}; };
/* device attributes */ /* device attributes */
static DEVICE_ATTR(engine1_mode, S_IRUGO | S_IWUGO, static DEVICE_ATTR(engine1_mode, S_IRUGO | S_IWUSR,
show_engine1_mode, store_engine1_mode); show_engine1_mode, store_engine1_mode);
static DEVICE_ATTR(engine2_mode, S_IRUGO | S_IWUGO, static DEVICE_ATTR(engine2_mode, S_IRUGO | S_IWUSR,
show_engine2_mode, store_engine2_mode); show_engine2_mode, store_engine2_mode);
static DEVICE_ATTR(engine3_mode, S_IRUGO | S_IWUGO, static DEVICE_ATTR(engine3_mode, S_IRUGO | S_IWUSR,
show_engine3_mode, store_engine3_mode); show_engine3_mode, store_engine3_mode);
static DEVICE_ATTR(engine1_load, S_IWUGO, NULL, store_engine1_load); static DEVICE_ATTR(engine1_load, S_IWUSR, NULL, store_engine1_load);
static DEVICE_ATTR(engine2_load, S_IWUGO, NULL, store_engine2_load); static DEVICE_ATTR(engine2_load, S_IWUSR, NULL, store_engine2_load);
static DEVICE_ATTR(engine3_load, S_IWUGO, NULL, store_engine3_load); static DEVICE_ATTR(engine3_load, S_IWUSR, NULL, store_engine3_load);
static DEVICE_ATTR(selftest, S_IRUGO, lp5521_selftest, NULL); static DEVICE_ATTR(selftest, S_IRUGO, lp5521_selftest, NULL);
static struct attribute *lp5521_attributes[] = { static struct attribute *lp5521_attributes[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment