public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 1/2] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
@ 2013-01-28 15:11 Otavio Salvador
  2013-01-28 15:11 ` [U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED Otavio Salvador
  0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2013-01-28 15:11 UTC (permalink / raw)
  To: u-boot

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 v3: None
Changes in v2: None

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

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)
-- 
1.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-28 15:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 15:11 [U-Boot] [PATCH v3 1/2] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set Otavio Salvador
2013-01-28 15:11 ` [U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED Otavio Salvador
2013-01-28 15:10   ` Marek Vasut
2013-01-28 15:12     ` Otavio Salvador
2013-01-28 15:18       ` Marek Vasut
2013-01-28 15:20         ` Otavio Salvador
2013-01-28 15:23           ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox