From patchwork Tue Aug 16 02:42:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 110129 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 170EAB6F7C for ; Tue, 16 Aug 2011 12:44:36 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 24E19280A9; Tue, 16 Aug 2011 04:44:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8Uw7C431oHOw; Tue, 16 Aug 2011 04:44:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E8216280AD; Tue, 16 Aug 2011 04:44:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0D51128086 for ; Tue, 16 Aug 2011 04:44:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id neb9plsDLblF for ; Tue, 16 Aug 2011 04:44:20 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by theia.denx.de (Postfix) with ESMTPS id 3F913280A9 for ; Tue, 16 Aug 2011 04:44:14 +0200 (CEST) Received: by ywm21 with SMTP id 21so3269482ywm.3 for ; Mon, 15 Aug 2011 19:44:13 -0700 (PDT) Received: by 10.101.151.40 with SMTP id d40mr4418785ano.146.1313462653646; Mon, 15 Aug 2011 19:44:13 -0700 (PDT) Received: from localhost.localdomain (ip65-46-142-190.z142-46-65.customer.algx.net [65.46.142.190]) by mx.google.com with ESMTPS id t11sm2208874and.3.2011.08.15.19.44.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Aug 2011 19:44:13 -0700 (PDT) From: Joel A Fernandes To: u-boot@lists.denx.de Date: Mon, 15 Aug 2011 21:42:05 -0500 Message-Id: <1313462527-3876-5-git-send-email-agnel.joel@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1313462527-3876-1-git-send-email-agnel.joel@gmail.com> References: <1313462527-3876-1-git-send-email-agnel.joel@gmail.com> Cc: Syed Mohammed Khasim , k-kooi@ti.com, jdk@ti.com Subject: [U-Boot] [PATCH 5/7] led: Fixed setting of STATUS_LED_BIT1 when led_name is 'all' X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Signed-off-by: Jason Kridner --- 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) + break; } }