diff options
author | Simon Glass <sjg@chromium.org> | 2020-05-10 11:40:03 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-18 18:36:55 -0400 |
commit | 09140113108541b95d340f3c7b6ee597d31ccc73 (patch) | |
tree | 4b4241b799bbbb2eeef4164392442b193af1703f /cmd/osd.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/osd.c')
-rw-r--r-- | cmd/osd.c | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -10,6 +10,7 @@ */ #include <common.h> +#include <command.h> #include <dm.h> #include <hexdump.h> #include <video_osd.h> @@ -80,8 +81,8 @@ static void show_osd(struct udevice *osd) printf("\n"); } -static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { uint x, y; uint count; @@ -131,8 +132,8 @@ static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_print(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { uint x, y; u8 color; @@ -161,8 +162,8 @@ static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_size(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { uint x, y; int res; @@ -187,8 +188,8 @@ static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_show_osd(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_show_osd(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *osd; @@ -223,8 +224,8 @@ static int do_show_osd(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_osd_num(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_num(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int osd_no; int res = 0; @@ -250,7 +251,7 @@ static int do_osd_num(cmd_tbl_t *cmdtp, int flag, int argc, return res ? CMD_RET_FAILURE : CMD_RET_SUCCESS; } -static cmd_tbl_t cmd_osd_sub[] = { +static struct cmd_tbl cmd_osd_sub[] = { U_BOOT_CMD_MKENT(show, 1, 1, do_show_osd, "", ""), U_BOOT_CMD_MKENT(dev, 1, 1, do_osd_num, "", ""), U_BOOT_CMD_MKENT(write, 4, 1, do_osd_write, "", ""), @@ -258,9 +259,9 @@ static cmd_tbl_t cmd_osd_sub[] = { U_BOOT_CMD_MKENT(size, 2, 1, do_osd_size, "", ""), }; -static int do_osd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_osd(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; |