Message ID | 1313462527-3876-5-git-send-email-agnel.joel@gmail.com |
---|---|
State | Not Applicable |
Headers | show |
Hello. On 16-08-2011 6:42, Joel A Fernandes wrote: > 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 > Signed-off-by: Joel A Fernandes<agnel.joel@gmail.com> > Signed-off-by: Jason Kridner<jkridner@beagleboard.org> > --- > common/cmd_led.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > diff --git a/common/cmd_led.c b/common/cmd_led.c > index d14dd5a..d3a8450 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) There should be space after *if* -- run patches thry checkpatch.pl. WBR, Sergei
On Tue, Aug 16, 2011 at 6:14 AM, Sergei Shtylyov <sshtylyov@mvista.com> wrote: > Hello. > > On 16-08-2011 6:42, Joel A Fernandes wrote: > >> Fix for only one led getting set or reset when the led_name is 'all' > Hi, Thanks for pointing that out. Should I have to re-send the entire patch series or just patches that need a correction? Thanks!
diff --git a/common/cmd_led.c b/common/cmd_led.c index d14dd5a..d3a8450 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; } }