leds: Expand led_colors[] array
PATCH 1/1 leds: Expand led_colors[] array
commit 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions") expands LED_COLOR_ID definitions for dt-binding. However, it doesn't expand the led_colors[] array in leds core, so if any of the newly expaned LED_COLOR_ID definitions is used, the sysfs will emit null in the led's name color part. Let's expand the led_colors[] array too.
Before the commit:/sys/class/leds # ls
(null):indicator-0
After the commit:/sys/class/leds # ls
orange:indicator-0
--- drivers/leds/led-core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/leds/led-core.c +5 -0
@@ -36,6 +36,11 @@ const char * const led_colors[LED_COLOR_ID_MAX] = { [LED_COLOR_ID_IR] = "ir", [LED_COLOR_ID_MULTI] = "multicolor", [LED_COLOR_ID_RGB] = "rgb", + [LED_COLOR_ID_PURPLE] = "purple", + [LED_COLOR_ID_ORANGE] = "orange", + [LED_COLOR_ID_PINK] = "pink", + [LED_COLOR_ID_CYAN] = "cyan", + [LED_COLOR_ID_LIME ] ="lime" , };EXPORT_SYMBOL_GPL (led_colors);
Signature · 1 line
2.40.1
Lee Jones
maintainerQuoted 11 lines · Jisheng Zhang
commit
472d7b9e8141("dt-bindings: leds: ExpandLED_COLOR_IDdefinitions") expandsLED_COLOR_IDdefinitions for dt-binding. However, it doesn't expand the led_colors[] array in leds core, so if any of the newly expanedLED_COLOR_IDdefinitions is used, the sysfs will emit null in the led's name color part. Let's expand the led_colors[] array too.Before the commit:
/sys/class/leds# ls
(null):indicator-0
Quoted 8 lines
After the commit:
/sys/class/leds# ls
orange:indicator-0Signed-off-by Jisheng Zhang <[email protected]>--- drivers/leds/led-core.c | 5 +++++ 1 file changed, 5 insertions(+)
This already exists as:
a067943129b4e leds: core: Add more colors from DT bindings to led_colors
Signature · 1 line
Lee Jones [李琼斯]
Quoted 17 lines · Lee Jones
Quoted 15 lines · Jisheng Zhang
commit
472d7b9e8141("dt-bindings: leds: ExpandLED_COLOR_IDdefinitions") expandsLED_COLOR_IDdefinitions for dt-binding. However, it doesn't expand the led_colors[] array in leds core, so if any of the newly expanedLED_COLOR_IDdefinitions is used, the sysfs will emit null in the led's name color part. Let's expand the led_colors[] array too.Before the commit:
/sys/class/leds# ls
(null):indicator-0After the commit:
/sys/class/leds# ls
orange:indicator-0
Quoted 8 lines
Quoted 4 lines
Signed-off-by Jisheng Zhang <[email protected]>--- drivers/leds/led-core.c | 5 +++++ 1 file changed, 5 insertions(+)This already exists as:
a067943129b4eleds: core: Add more colors from DT bindings toled_colors
well, my patch was sent earlier than this one... When I sent out the patch there's neither fix in mailist nor in your repo.
Lee Jones
maintainerQuoted 23 lines · Jisheng Zhang
Quoted 22 lines · Lee Jones
Quoted 19 lines · Jisheng Zhang
commit
472d7b9e8141("dt-bindings: leds: ExpandLED_COLOR_IDdefinitions") expandsLED_COLOR_IDdefinitions for dt-binding. However, it doesn't expand the led_colors[] array in leds core, so if any of the newly expanedLED_COLOR_IDdefinitions is used, the sysfs will emit null in the led's name color part. Let's expand the led_colors[] array too.Before the commit:
/sys/class/leds# ls
(null):indicator-0After the commit:
/sys/class/leds# ls
orange:indicator-0Signed-off-by Jisheng Zhang <[email protected]>--- drivers/leds/led-core.c | 5 +++++ 1 file changed, 5 insertions(+)
Quoted 6 lines
Quoted 3 lines
This already exists as:
a067943129b4eleds: core: Add more colors from DT bindings toled_colorswell, my patch was sent earlier than this one... When I sent out the patch there's neither fix in mailist nor in your repo.
What makes you think that?
The applied patch was submitted 8th October.
https://lore.kernel.org/all/[email protected]/
Yours was submitted 30th October, 3 weeks later.
https://lore.kernel.org/all/[email protected]/
Signature · 1 line
Lee Jones [李琼斯]