diff options
author | Scott Anderson <saa@google.com> | 2011-08-16 18:27:25 -0700 |
---|---|---|
committer | Mike J. Chen <mjchen@google.com> | 2012-03-03 17:05:23 -0800 |
commit | 455cbc518253d79590d74037655b584f5039f235 (patch) | |
tree | 8227b18deec5a61e4a33e8759fa7c53363097b4c /drivers | |
parent | 7375eecb85c099de4eac18fc4a97d309bfbc2084 (diff) | |
download | uboot-455cbc518253d79590d74037655b584f5039f235.tar.gz |
Clean up and enable LED command code.
1) Fix Makefile so cmd_led is built if CONFIG_CMD_LED is on.
2) Fix status LED code so the on and off functions are not reversed for
the color LEDs. This was done by cleaning up to initialization of
the led_commands array to be more obvious when the off and on
functions were reversed.
3) Fix led command so "all" actually works on all LEDs instead of just
the first. This also included reducing multiple calls to strcmp()
down to just checking a variable.
4) Remove extra newlines from the led command's help messages.
5) Allow STATUS_LED_BIT to be optional to match doc/README.LED.
Change-Id: Idc91479bcff2ca8b47826dadd13650ce2502d57a
Signed-off-by: Scott Anderson <saa@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/status_led.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c index 4ba3e1804..7f38603a7 100644 --- a/drivers/misc/status_led.c +++ b/drivers/misc/status_led.c @@ -43,11 +43,13 @@ typedef struct { } led_dev_t; led_dev_t led_dev[] = { +#if defined(STATUS_LED_BIT) { STATUS_LED_BIT, STATUS_LED_STATE, STATUS_LED_PERIOD, 0, }, +#endif #if defined(STATUS_LED_BIT1) { STATUS_LED_BIT1, STATUS_LED_STATE1, |