[U-Boot] [PATCH 30/37] Blackfin: cmd_gpio: accept upper case pin names
Mike Frysinger
vapier at gentoo.org
Sat Oct 2 22:05:51 CEST 2010
The intention all along was to accept pin names irrelevant of their case.
But I guess I forgot to test/implement support for that.
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
arch/blackfin/cpu/cmd_gpio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/blackfin/cpu/cmd_gpio.c b/arch/blackfin/cpu/cmd_gpio.c
index 3e7ba0a..e96413b 100644
--- a/arch/blackfin/cpu/cmd_gpio.c
+++ b/arch/blackfin/cpu/cmd_gpio.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
+#include <linux/ctype.h>
#include <asm/blackfin.h>
#include <asm/gpio.h>
@@ -45,8 +46,8 @@ int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* grab the [p]<port> portion */
ulong port_base;
- if (*str_pin == 'p') ++str_pin;
- switch (*str_pin) {
+ if (tolower(*str_pin) == 'p') ++str_pin;
+ switch (tolower(*str_pin)) {
#ifdef GPIO_PA0
case 'a': port_base = GPIO_PA0; break;
#endif
--
1.7.3.1
More information about the U-Boot
mailing list