mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
amcc: Clean up command usage output
Update taihu and taishan commands to use cmd_usage() function to display usage messages. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
This commit is contained in:
parent
62c3ae7c6e
commit
79621bc10b
3 changed files with 9 additions and 9 deletions
|
@ -140,7 +140,7 @@ static int do_lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||
static int do_lcd_puts (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
printf("%s", cmdtp->usage);
|
||||
cmd_usage(cmdtp);
|
||||
return 1;
|
||||
}
|
||||
lcd_puts(argv[1]);
|
||||
|
@ -151,7 +151,7 @@ static int do_lcd_puts (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||
static int do_lcd_putc (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
printf("%s", cmdtp->usage);
|
||||
cmd_usage(cmdtp);
|
||||
return 1;
|
||||
}
|
||||
lcd_putc((char)argv[1][0]);
|
||||
|
@ -166,7 +166,7 @@ static int do_lcd_cur (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||
char cur_addr;
|
||||
|
||||
if (argc < 3) {
|
||||
printf("%s", cmdtp->usage);
|
||||
cmd_usage(cmdtp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,13 +102,13 @@ static int do_led_ctl(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[])
|
|||
int led_no;
|
||||
|
||||
if (argc != 3) {
|
||||
printf("%s", cmd_tp->usage);
|
||||
cmd_usage(cmd_tp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
led_no = simple_strtoul(argv[1], NULL, 16);
|
||||
if (led_no != 1 && led_no != 2) {
|
||||
printf("%s", cmd_tp->usage);
|
||||
cmd_usage(cmd_tp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ static int do_led_ctl(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[])
|
|||
else
|
||||
gpio_write_bit(31, 0);
|
||||
} else {
|
||||
printf("%s", cmd_tp->usage);
|
||||
cmd_usage(cmd_tp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ static int do_lcd_clear(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||
static int do_lcd_puts(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
printf("%s", cmdtp->usage);
|
||||
cmd_usage(cmdtp);
|
||||
return 1;
|
||||
}
|
||||
lcd_puts(argv[1]);
|
||||
|
@ -176,7 +176,7 @@ static int do_lcd_puts(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||
static int do_lcd_putc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
printf("%s", cmdtp->usage);
|
||||
cmd_usage(cmdtp);
|
||||
return 1;
|
||||
}
|
||||
lcd_putc((char)argv[1][0]);
|
||||
|
@ -189,7 +189,7 @@ static int do_lcd_cur(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||
char cur_addr;
|
||||
|
||||
if (argc < 3) {
|
||||
printf("%s", cmdtp->usage);
|
||||
cmd_usage(cmdtp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue