Skip to contentSkip to conversation

led: use correct name for /sys/devices/virtual/leds/ entries

PATCH In review [email protected] 2 participants 3 messages Jul 18, 2012 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 led: use correct name for /sys/devices/virtual/leds/ entries

From: Olaf Hering <[email protected]>

Follow naming according to Documentation/leds/leds-class.txt:
LED Device Naming
Is currently of the form:
"devicename:colour:function"

Reported during openSuSE 11.1 testing.
https://bugzilla.novell.com/show_bug.cgi?&id=468350

drivers/leds/ledtrig-default-on.c +1 -1
index a4ef54b..2efdd30 100644
@@ -23,7 +23,7 @@ static void defon_trig_activate(struct led_classdev *led_cdev)
 }
 
 static struct led_trigger defon_led_trigger = {
-	.name     = "default-on",
+	.name     = "default::on",
 	.activate = defon_trig_activate,
 };
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 17 lines · On 07/18/2012 06:49 PM, [email protected] wrote:

From: Olaf Hering <[email protected]>

Follow naming according to Documentation/leds/leds-class.txt:
LED Device Naming
Is currently of the form:
"devicename:colour:function"

Reported during openSuSE 11.1 testing.
https://bugzilla.novell.com/show_bug.cgi?&id=468350

drivers/leds/ledtrig-default-on.c +0 -0
index a4ef54b..2efdd30 100644

drivers/leds/ledtrig-default-on.c static void defon_trig_activate(struct led_classdev *led_cdev) · line 29

Quoted 8 lines
drivers/leds/ledtrig-default-on.c +1 -1
@@ -23,7 +23,7 @@ static void defon_trig_activate(struct led_classdev *led_cdev)
 }
 
 static struct led_trigger defon_led_trigger = {
-	.name     = "default-on",
+	.name     = "default::on",
 	.activate = defon_trig_activate,
 };
 

That's a LED trigger, not a LED. So the LED naming convention doesn't apply here and it does not even make sense to try to apply it. Also the patch breaks all users of the default-on trigger.

- Lars

#2 lore raw
Quoted 3 lines · Lars-Peter Clausen

That's a LED trigger, not a LED. So the LED naming convention doesn't apply here and it does not even make sense to try to apply it. Also the patch breaks all users of the default-on trigger.

Thanks for the review. The real fix was applied in db3f5207, no idea why I changed also this file. Up to now noone noticed the name change.

Olaf