From 09140113108541b95d340f3c7b6ee597d31ccc73 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:03 -0600 Subject: 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 --- cmd/osd.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'cmd/osd.c') diff --git a/cmd/osd.c b/cmd/osd.c index 0b1fa499368..bdad5d8e963 100644 --- a/cmd/osd.c +++ b/cmd/osd.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -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; -- cgit v1.2.3