Skip to contentSkip to conversation

led-class: set permissions on max_brightness file to 0444

PATCH Applied Axel Lin 2 participants 2 messages May 17, 2010 – May 26, 2010 LED

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 led-class: set permissions on max_brightness file to 0444

max_brightness is not writable, thus set permissions to 0444.

---
 drivers/leds/led-class.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/leds/led-class.c +1 -1
index 69e7d86..2606600 100644
@@ -74,7 +74,7 @@ static ssize_t led_max_brightness_show(struct device *dev,
 
 static struct device_attribute led_class_attrs[] = {
 	__ATTR(brightness, 0644, led_brightness_show, led_brightness_store),
-	__ATTR(max_brightness, 0644, led_max_brightness_show, NULL),
+	__ATTR(max_brightness, 0444, led_max_brightness_show, NULL),
 #ifdef CONFIG_LEDS_TRIGGERS
 	__ATTR(trigger, 0644, led_trigger_show, led_trigger_store),
 #endif
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 12 lines · Axel Lin

max_brightness is not writable, thus set permissions to 0444.

---
 drivers/leds/led-class.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/leds/led-class.c +0 -0
index 69e7d86..2606600 100644

drivers/leds/led-class.c static ssize_t led_max_brightness_show(struct device *dev, · line 80

Quoted 8 lines
drivers/leds/led-class.c +1 -1
@@ -74,7 +74,7 @@ static ssize_t led_max_brightness_show(struct device *dev,
 
 static struct device_attribute led_class_attrs[] = {
 	__ATTR(brightness, 0644, led_brightness_show, led_brightness_store),
-	__ATTR(max_brightness, 0644, led_max_brightness_show, NULL),
+	__ATTR(max_brightness, 0444, led_max_brightness_show, NULL),
 #ifdef CONFIG_LEDS_TRIGGERS
 	__ATTR(trigger, 0644, led_trigger_show, led_trigger_store),
 #endif

Queued in the leds tree, thanks.

Richard