From patchwork Mon Jan 28 17:13:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 216258 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 698072C0091 for ; Tue, 29 Jan 2013 04:09:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D1D704A0EE; Mon, 28 Jan 2013 18:09:06 +0100 (CET) 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 k-BkAMc8dc-H; Mon, 28 Jan 2013 18:09:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 64DC64A033; Mon, 28 Jan 2013 18:09:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A2504A033 for ; Mon, 28 Jan 2013 18:09:02 +0100 (CET) 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 QTOchfbHmrXF for ; Mon, 28 Jan 2013 18:09:01 +0100 (CET) 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-gh0-f174.google.com (mail-gh0-f174.google.com [209.85.160.174]) by theia.denx.de (Postfix) with ESMTPS id 5E5F64A02F for ; Mon, 28 Jan 2013 18:09:00 +0100 (CET) Received: by mail-gh0-f174.google.com with SMTP id g15so437717ghb.5 for ; Mon, 28 Jan 2013 09:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer; bh=cIM8pdermjelMWPioiDLHJjZZyu0eYnxvl/i9mZZevs=; b=kH6nmeWl5GFOrBjyiATImrD3JmePVLJHN4xMskoi5msYHdW5Ips1GBAjV5IZ33EIRp 3DEgLYAgTJmpzypst6UFtoXNkBkMsVcRcsUBokwN3DGejNZ6wAu1nPxLNbrr5nCG2dXe 27S/4ABtyA84F1KPxOIQspAqcU9Y2pQzhMHYPHyVxlz1GGmj3TsEOhSp+IhyV0t+Iu7P ZQ37mtueRuG/Y6tb41Hu9soyciBrpc2I9Br/EIr1FlblsPOhNXhHYaieMUS+hDBv4Zlg LLb050BXt0hShPMLwLcBTxn2Xh359q8/S5YSxcHyRnvz1OZDUUS1v0bgyTGVOzhIuQPP aj6Q== X-Received: by 10.236.59.98 with SMTP id r62mr15914329yhc.130.1359392937377; Mon, 28 Jan 2013 09:08:57 -0800 (PST) Received: from nano.lab.ossystems.com.br ([177.35.66.48]) by mx.google.com with ESMTPS id j26sm5758647ani.6.2013.01.28.09.08.54 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jan 2013 09:08:56 -0800 (PST) From: Otavio Salvador To: u-boot@lists.denx.de Date: Mon, 28 Jan 2013 15:13:13 -0200 Message-Id: <1359393195-27997-1-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.8.1 Cc: Otavio Salvador Subject: [U-Boot] [PATCH v5 1/3] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 This fixes the gpio_led driver which needs to compare againt a STATUS_LED_ON to enable a led. Signed-off-by: Otavio Salvador --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None common/cmd_led.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/cmd_led.c b/common/cmd_led.c index 7f5ab43..84f79fa 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -110,13 +110,15 @@ 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)