[PATCH platform-next 1/2] leds: mlxreg: Remove code for amber LED colour

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

 



Remove unused code for amber LED colour.

In case system LED color is "red", "orange" or "amber" same code is to
be used for colour setting.

Signed-off-by: Vadim Pasternak <vadimp@xxxxxxxxxx>
Reviewed-by: Michael Shych <michaelsh@xxxxxxxxxx>
---
 drivers/leds/leds-mlxreg.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c
index b7855c93bd72..916544e95e26 100644
--- a/drivers/leds/leds-mlxreg.c
+++ b/drivers/leds/leds-mlxreg.c
@@ -19,7 +19,6 @@
 #define MLXREG_LED_IS_OFF		0x00 /* Off */
 #define MLXREG_LED_RED_SOLID		0x05 /* Solid red */
 #define MLXREG_LED_GREEN_SOLID		0x0D /* Solid green */
-#define MLXREG_LED_AMBER_SOLID		0x09 /* Solid amber */
 #define MLXREG_LED_BLINK_3HZ		167 /* ~167 msec off/on - HW support */
 #define MLXREG_LED_BLINK_6HZ		83 /* ~83 msec off/on - HW support */
 #define MLXREG_LED_CAPABILITY_CLEAR	GENMASK(31, 8) /* Clear mask */
@@ -218,13 +217,10 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv)
 
 		led_cdev = &led_data->led_cdev;
 		led_data->data_parent = priv;
-		if (strstr(data->label, "red") ||
-		    strstr(data->label, "orange")) {
+		if (strstr(data->label, "red") || strstr(data->label, "orange") ||
+		    strstr(data->label, "amber")) {
 			brightness = LED_OFF;
 			led_data->base_color = MLXREG_LED_RED_SOLID;
-		} else if (strstr(data->label, "amber")) {
-			brightness = LED_OFF;
-			led_data->base_color = MLXREG_LED_AMBER_SOLID;
 		} else {
 			brightness = LED_OFF;
 			led_data->base_color = MLXREG_LED_GREEN_SOLID;
-- 
2.20.1




[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