Patchwork [U-Boot,v2,04/10] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set

login
register
mail settings
Submitter Otavio Salvador
Date Feb. 11, 2013, 1:35 p.m.
Message ID <1360589756-26355-5-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/219602/
State Superseded
Delegated to: Stefano Babic
Headers show

Comments

Otavio Salvador - Feb. 11, 2013, 1:35 p.m.
This fixes the gpio_led driver which needs to compare againt a
STATUS_LED_ON to enable a led.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v2: None

 common/cmd_led.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/common/cmd_led.c b/common/cmd_led.c
index 7f5ab43..84f79fa 100644
--- a/common/cmd_led.c
+++ b/common/cmd_led.c
@@ -110,13 +110,15 @@  int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 				if (led_commands[i].on)
 					led_commands[i].on();
 				else
-					__led_set(led_commands[i].mask, 1);
+					__led_set(led_commands[i].mask,
+							  STATUS_LED_ON);
 				break;
 			case LED_OFF:
 				if (led_commands[i].off)
 					led_commands[i].off();
 				else
-					__led_set(led_commands[i].mask, 0);
+					__led_set(led_commands[i].mask,
+							  STATUS_LED_OFF);
 				break;
 			case LED_TOGGLE:
 				if (led_commands[i].toggle)