From patchwork Fri Feb 8 09:41:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Freyther X-Patchwork-Id: 219076 X-Patchwork-Delegate: trini@ti.com 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 5218B2C008D for ; Fri, 8 Feb 2013 20:50:37 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A2FC4A03F; Fri, 8 Feb 2013 10:50:27 +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 2FGum3lR9m7a; Fri, 8 Feb 2013 10:50:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E42FE4A0FC; Fri, 8 Feb 2013 10:50:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CEE74A099 for ; Fri, 8 Feb 2013 10:41:25 +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 EIpiAWPjMU6G for ; Fri, 8 Feb 2013 10:41:24 +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.sysmocom.de (sysmocom.de [78.46.147.233]) by theia.denx.de (Postfix) with ESMTP id 4CB724A09F for ; Fri, 8 Feb 2013 10:41:23 +0100 (CET) Received: from sangmingze-mail.local (siminn-int-gw.on-waves.com [157.157.59.158]) by mail.sysmocom.de (Postfix) with ESMTPSA id 860BB25434E1; Fri, 8 Feb 2013 09:56:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=xiaoyu.lan) by sangmingze-mail.local with esmtp (Exim 4.80) (envelope-from ) id 1U3kSQ-0001Lh-VZ; Fri, 08 Feb 2013 10:41:23 +0100 From: Holger Hans Peter Freyther To: u-boot@lists.denx.de Date: Fri, 8 Feb 2013 10:41:02 +0100 Message-Id: <1360316463-5061-2-git-send-email-holger@freyther.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360316463-5061-1-git-send-email-holger@freyther.de> References: <20130125221231.GH30402@bill-the-cat> <1360316463-5061-1-git-send-email-holger@freyther.de> X-Mailman-Approved-At: Fri, 08 Feb 2013 10:50:08 +0100 Cc: Holger Hans Peter Freyther Subject: [U-Boot] [PATCH 2/3] led: The gpio_led.c code expects that LED state is from the enum 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 u-boot is not consistent if state should be 0|1 or of the enum, the GPIO driver expects this to be one of the enum values. Update the caller. Signed-off-by: Holger Hans Peter Freyther --- common/cmd_led.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_led.c b/common/cmd_led.c index 7f5ab43..c725f95 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -110,13 +110,13 @@ 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)