From: Joel A Fernandes Date: Fri, 12 Aug 2011 00:10:19 +0000 (-0500) Subject: led: Fixed setting of STATUS_LED_BIT1 when led_name is 'all' X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=d604cda34ab2190fb07a1134bb488105e1a2f9c3;p=u-boot.git led: Fixed setting of STATUS_LED_BIT1 when led_name is 'all' Fix for only one led getting set or reset when the led_name is 'all' Previous discussion: http://lists.denx.de/pipermail/u-boot/2011-May/093068.html Changes since v1: Fixed checkpatch if statement error noticed by Sergei. Signed-off-by: Joel A Fernandes Signed-off-by: Jason Kridner Cc: Sergei Shtylyov Signed-off-by: Sandeep Paulraj --- diff --git a/common/cmd_led.c b/common/cmd_led.c index d14dd5adab..183dc0b42f 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -108,7 +108,9 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } else { __led_set(led_commands[i].mask, state); } - break; + /* Need to set only 1 led if led_name wasn't 'all' */ + if (strcmp("all", argv[1]) != 0) + break; } }