From patchwork Tue Jan 29 10:39:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 216493 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 1189D2C0087 for ; Tue, 29 Jan 2013 21:35:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F8D04A0FE; Tue, 29 Jan 2013 11:35:00 +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 h6tIvQvYDV+8; Tue, 29 Jan 2013 11:35:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 980004A105; Tue, 29 Jan 2013 11:34:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4350E4A105 for ; Tue, 29 Jan 2013 11:34:57 +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 2ek5ZrqNqMZt for ; Tue, 29 Jan 2013 11:34:56 +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-ye0-f170.google.com (mail-ye0-f170.google.com [209.85.213.170]) by theia.denx.de (Postfix) with ESMTPS id 2793F4A0FE for ; Tue, 29 Jan 2013 11:34:53 +0100 (CET) Received: by mail-ye0-f170.google.com with SMTP id m12so18529yen.1 for ; Tue, 29 Jan 2013 02:34:52 -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=SwFuB1uQ4NCSXfhLEbyvqSYh0tQqg3NqEZ2XYyrgIuA=; b=WzXvL5RG+lTNrTCvWyMrAQV91qYkQkJlq8x4OSuiAOic/fp7Cs9LuD485IIolO6VbH tiw4I2AEmXgVioHeacmDOM2+B4dANIoa4KW/pQyMqbfE3uOMDwfNhorTvx7EpUJmbLz3 j/6z7nmt6hs64U5RmEHWjhTgUUCVLZlAuYxs+39W1PfybVITTzmhz6mOYBjtWxvymlqa tvkNknQBRvgBYNC8STw/d4/eUd12SNSBjrryWuFQv3Np2qq9ku8zXgah+G5FZpN1HNgh ieTMhBZ0qU3BflXugLfxrx/5S35IQ6N+RM3PaLOzMsgzyxA7omzjc9vGLKZrOlC6JTyU MQyw== X-Received: by 10.101.143.20 with SMTP id v20mr128805ann.33.1359455691837; Tue, 29 Jan 2013 02:34:51 -0800 (PST) Received: from nano.lab.ossystems.com.br ([177.35.66.48]) by mx.google.com with ESMTPS id c44sm13011953yhl.15.2013.01.29.02.34.49 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 02:34:50 -0800 (PST) From: Otavio Salvador To: u-boot@lists.denx.de Date: Tue, 29 Jan 2013 08:39:08 -0200 Message-Id: <1359455950-24930-1-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.8.1 Cc: Otavio Salvador Subject: [U-Boot] [PATCH v6 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 v6: None 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)