diff options
Diffstat (limited to 'common/cmd_flash.c')
-rw-r--r-- | common/cmd_flash.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/cmd_flash.c b/common/cmd_flash.c index c6ea25ac5b..0e9b2e3c74 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -335,7 +335,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int rcode = 0; if (argc < 2) - return cmd_usage(cmdtp); + return CMD_RET_USAGE; if (strcmp(argv[1], "all") == 0) { for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) { @@ -384,7 +384,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #endif if (argc != 3) - return cmd_usage(cmdtp); + return CMD_RET_USAGE; if (strcmp(argv[1], "bank") == 0) { bank = simple_strtoul(argv[2], NULL, 16); @@ -405,7 +405,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } if (addr_first >= addr_last) - return cmd_usage(cmdtp); + return CMD_RET_USAGE; rcode = flash_sect_erase(addr_first, addr_last); return rcode; @@ -475,7 +475,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #endif if (argc < 3) - return cmd_usage(cmdtp); + return CMD_RET_USAGE; #if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH) if (strcmp(argv[1], "off") == 0) @@ -483,7 +483,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) else if (strcmp(argv[1], "on") == 0) p = 1; else - return cmd_usage(cmdtp); + return CMD_RET_USAGE; #endif #ifdef CONFIG_HAS_DATAFLASH @@ -583,7 +583,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #endif if (argc != 4) - return cmd_usage(cmdtp); + return CMD_RET_USAGE; if (strcmp(argv[2], "bank") == 0) { bank = simple_strtoul(argv[3], NULL, 16); @@ -623,7 +623,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } if (addr_first >= addr_last) - return cmd_usage(cmdtp); + return CMD_RET_USAGE; rcode = flash_sect_protect (p, addr_first, addr_last); #endif /* CONFIG_SYS_NO_FLASH */ |