]> git.sur5r.net Git - u-boot/blobdiff - arch/blackfin/cpu/cmd_gpio.c
boot: change some arch ifdefs to feature ifdefs
[u-boot] / arch / blackfin / cpu / cmd_gpio.c
index 5988da7917107c11f94794018ab503c0cc055d51..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
@@ -108,7 +109,7 @@ int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
        gpio_free(gpio);
 
-       return 0;
+       return value;
 }
 
 U_BOOT_CMD(gpio, 3, 0, do_gpio,