From patchwork Fri Jan 18 15:19:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Freyther X-Patchwork-Id: 213646 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 A1CAF2C007B for ; Sat, 19 Jan 2013 02:48:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0657F4A10A; Fri, 18 Jan 2013 16:48:10 +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 dHa52rUZ2dwa; Fri, 18 Jan 2013 16:48:09 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 082DC4A0C6; Fri, 18 Jan 2013 16:48:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D87FD4A0EB for ; Fri, 18 Jan 2013 16:28:38 +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 9Bw505xCr5AC for ; Fri, 18 Jan 2013 16:28:38 +0100 (CET) X-Greylist: delayed 516 seconds by postgrey-1.27 at theia; Fri, 18 Jan 2013 16:28:33 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 254864A0BF for ; Fri, 18 Jan 2013 16:28:33 +0100 (CET) Received: from sangmingze-mail.local (91-66-230-199-dynip.superkabel.de [91.66.230.199]) by mail.sysmocom.de (Postfix) with ESMTPSA id D3DE725434ED; Fri, 18 Jan 2013 15:33:41 +0000 (UTC) Received: from localhost.lan ([127.0.0.1] helo=xiaoyu.lan) by sangmingze-mail.local with esmtp (Exim 4.80) (envelope-from ) id 1TwDja-0002i4-74; Fri, 18 Jan 2013 16:19:58 +0100 From: Holger Hans Peter Freyther To: u-boot@lists.denx.de Date: Fri, 18 Jan 2013 16:19:49 +0100 Message-Id: <1358522390-10161-2-git-send-email-holger@freyther.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358522390-10161-1-git-send-email-holger@freyther.de> References: <1358522390-10161-1-git-send-email-holger@freyther.de> X-Mailman-Approved-At: Fri, 18 Jan 2013 16:48:04 +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. --- 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)