command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-05-10 11:40:03 -06:00
committed by Tom Rini
parent 691d719db7
commit 0914011310
465 changed files with 1987 additions and 1527 deletions

View File

@@ -96,8 +96,8 @@ static int axi_get_cur_bus(struct udevice **busp)
* Command handlers
*/
static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
static int do_axi_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dummy;
@@ -135,8 +135,8 @@ static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
static int do_axi_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret = 0;
int bus_no;
@@ -163,7 +163,8 @@ static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
return ret ? CMD_RET_FAILURE : 0;
}
static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_axi_md(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
/* Print that many bytes per line */
const uint DISP_LINE_LEN = 16;
@@ -261,7 +262,8 @@ static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_axi_mw(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
u32 writeval;
ulong addr, count, size;
@@ -312,17 +314,17 @@ static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
static cmd_tbl_t cmd_axi_sub[] = {
static struct cmd_tbl cmd_axi_sub[] = {
U_BOOT_CMD_MKENT(bus, 1, 1, do_axi_show_bus, "", ""),
U_BOOT_CMD_MKENT(dev, 1, 1, do_axi_bus_num, "", ""),
U_BOOT_CMD_MKENT(md, 4, 1, do_axi_md, "", ""),
U_BOOT_CMD_MKENT(mw, 5, 1, do_axi_mw, "", ""),
};
static int do_ihs_axi(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
static int do_ihs_axi(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
cmd_tbl_t *c;
struct cmd_tbl *c;
if (argc < 2)
return CMD_RET_USAGE;