stdio: Correct a build error with driver model
[platform/kernel/u-boot.git] / common / cmd_gpio.c
index c0cdc5f..bb0f63a 100644 (file)
@@ -12,7 +12,7 @@
 #include <dm.h>
 #include <asm/gpio.h>
 
-int __weak name_to_gpio(const char *name)
+__weak int name_to_gpio(const char *name)
 {
        return simple_strtoul(name, NULL, 10);
 }
@@ -141,7 +141,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
        if (argc > 0)
                str_gpio = *argv;
-       if (!strcmp(str_cmd, "status")) {
+       if (!strncmp(str_cmd, "status", 1)) {
                /* Support deprecated gpio_status() */
 #ifdef gpio_status
                gpio_status();