From mboxrd@z Thu Jan 1 00:00:00 1970 From: Holger Hans Peter Freyther Date: Fri, 8 Feb 2013 10:41:02 +0100 Subject: [U-Boot] [PATCH 2/3] led: The gpio_led.c code expects that LED state is from the enum 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> Message-ID: <1360316463-5061-2-git-send-email-holger@freyther.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@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) -- 1.7.10.4