led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
authorOtavio Salvador <otavio@ossystems.com.br>
Sat, 23 Feb 2013 02:43:07 +0000 (02:43 +0000)
committerStefano Babic <sbabic@denx.de>
Thu, 7 Mar 2013 16:22:57 +0000 (17:22 +0100)
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>
common/cmd_led.c

index 7f5ab43..84f79fa 100644 (file)
@@ -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)