]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Blackfin: cmd_gpio: accept upper case pin names
authorMike Frysinger <vapier@gentoo.org>
Fri, 24 Sep 2010 19:34:08 +0000 (15:34 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 2 Oct 2010 20:00:40 +0000 (16:00 -0400)
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@gentoo.org>
arch/blackfin/cpu/cmd_gpio.c

index 3e7ba0a347d28b414c0c1e11e89161a5d27c0de3..e96413b6390ffc391334ac71f4408e64cebe09b8 100644 (file)
@@ -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