]> Git Repo - J-u-boot.git/commitdiff
led: The gpio_led.c code expects that LED state is from the enum
authorHolger Hans Peter Freyther <[email protected]>
Thu, 7 Feb 2013 23:41:02 +0000 (23:41 +0000)
committerTom Rini <[email protected]>
Wed, 20 Feb 2013 13:52:41 +0000 (08:52 -0500)
u-boot is not consistent if state should be 0|1 or of the enum, the
GPIO driver expects this to be one of the enum values. Update the
caller.

Signed-off-by: Holger Hans Peter Freyther <[email protected]>
common/cmd_led.c

index 7f5ab43c7f5d92f4af1e799ae42e2ffcbe9f3786..c725f95ac138297d2c146c467fe1574fe5ceca36 100644 (file)
@@ -110,13 +110,13 @@ 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)
This page took 0.03728 seconds and 4 git commands to generate.