diff options
author | Simon Glass | 2020-05-10 11:40:03 -0600 |
---|---|---|
committer | Tom Rini | 2020-05-18 18:36:55 -0400 |
commit | 09140113108541b95d340f3c7b6ee597d31ccc73 (patch) | |
tree | 4b4241b799bbbb2eeef4164392442b193af1703f /cmd/axi.c | |
parent | 691d719db7183dfb1d1360efed4c5e9f6899095f (diff) |
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>
Diffstat (limited to 'cmd/axi.c')
-rw-r--r-- | cmd/axi.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/cmd/axi.c b/cmd/axi.c index 588098fddd4..18533efc0dd 100644 --- a/cmd/axi.c +++ b/cmd/axi.c @@ -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; |