From: Holger Hans Peter Freyther <holger@freyther.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] led: The gpio_led.c code expects that LED state is from the enum
Date: Fri, 18 Jan 2013 16:19:49 +0100 [thread overview]
Message-ID: <1358522390-10161-2-git-send-email-holger@freyther.de> (raw)
In-Reply-To: <1358522390-10161-1-git-send-email-holger@freyther.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)
--
1.7.10.4
next prev parent reply other threads:[~2013-01-18 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 15:19 [U-Boot] [PATCH 1/3] gpio: Build the da8xx_gpio code for the davinci644x device Holger Hans Peter Freyther
2013-01-18 15:19 ` Holger Hans Peter Freyther [this message]
2013-01-18 15:19 ` [U-Boot] [PATCH 3/3] mac: Fix the condition check for setting the MAC from the EEPROM Holger Hans Peter Freyther
2013-01-25 22:12 ` [U-Boot] [U-Boot, 1/3] gpio: Build the da8xx_gpio code for the davinci644x device Tom Rini
2013-02-08 9:41 ` [U-Boot] [PATCH " Holger Hans Peter Freyther
2013-02-08 9:41 ` [U-Boot] [PATCH 2/3] led: The gpio_led.c code expects that LED state is from the enum Holger Hans Peter Freyther
2013-02-08 11:52 ` Otavio Salvador
2013-02-08 9:41 ` [U-Boot] [PATCH 3/3] mac: Fix the condition check for setting the MAC from the EEPROM Holger Hans Peter Freyther
2013-02-20 15:03 ` [U-Boot] [U-Boot, 1/3] gpio: Build the da8xx_gpio code for the davinci644x device Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358522390-10161-2-git-send-email-holger@freyther.de \
--to=holger@freyther.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox