[PATCH 2/3] leds: core: add missing LED color strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some new monochromatic LEDs have been introduced into DT bindings,
but they do not have corresponding descriptions on the led_colors
structure. This patch adds missing LED color strings and sorts
them in the order defined by the dt-bindings.

Fixes: 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions")
Signed-off-by: Shiji Yang <yangshiji66@xxxxxxxxxxx>
---
 drivers/leds/led-core.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index 214ed81eb..67f53af3b 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -26,12 +26,17 @@ LIST_HEAD(leds_list);
 EXPORT_SYMBOL_GPL(leds_list);
 
 const char * const led_colors[LED_COLOR_ID_MAX] = {
-	[LED_COLOR_ID_WHITE] = "white",
-	[LED_COLOR_ID_RED] = "red",
-	[LED_COLOR_ID_GREEN] = "green",
-	[LED_COLOR_ID_BLUE] = "blue",
 	[LED_COLOR_ID_AMBER] = "amber",
+	[LED_COLOR_ID_BLUE] = "blue",
+	[LED_COLOR_ID_CYAN] = "cyan",
+	[LED_COLOR_ID_GREEN] = "green",
+	[LED_COLOR_ID_LIME] = "lime",
+	[LED_COLOR_ID_ORANGE] = "orange",
+	[LED_COLOR_ID_PINK] = "pink",
+	[LED_COLOR_ID_PURPLE] = "purple",
+	[LED_COLOR_ID_RED] = "red",
 	[LED_COLOR_ID_VIOLET] = "violet",
+	[LED_COLOR_ID_WHITE] = "white",
 	[LED_COLOR_ID_YELLOW] = "yellow",
 	[LED_COLOR_ID_IR] = "ir",
 	[LED_COLOR_ID_MULTI] = "multicolor",
-- 
2.39.2




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux