aboutsummaryrefslogtreecommitdiff
path: root/cmd/adtimg.c
diff options
context:
space:
mode:
authorSimon Glass2020-05-10 11:40:03 -0600
committerTom Rini2020-05-18 18:36:55 -0400
commit09140113108541b95d340f3c7b6ee597d31ccc73 (patch)
tree4b4241b799bbbb2eeef4164392442b193af1703f /cmd/adtimg.c
parent691d719db7183dfb1d1360efed4c5e9f6899095f (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/adtimg.c')
-rw-r--r--cmd/adtimg.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/cmd/adtimg.c b/cmd/adtimg.c
index 60bb01c3498..aa943007f35 100644
--- a/cmd/adtimg.c
+++ b/cmd/adtimg.c
@@ -5,6 +5,7 @@
* Eugeniu Rosca <rosca.eugeniu@gmail.com>
*/
+#include <command.h>
#include <env.h>
#include <image-android-dt.h>
#include <common.h>
@@ -17,8 +18,8 @@
*/
static ulong working_img;
-static int do_adtimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_addr(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *endp;
ulong hdr_addr;
@@ -56,8 +57,8 @@ static int adtimg_check_working_img(void)
return CMD_RET_SUCCESS;
}
-static int do_adtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc != 1)
return CMD_RET_USAGE;
@@ -99,7 +100,7 @@ static int adtimg_getopt_u32(char * const opt, char * const name, u32 *optval)
return CMD_RET_SUCCESS;
}
-static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
+static int adtimg_getopt_index(int argc, char *const argv[], u32 *index,
char **avar, char **svar)
{
int ret;
@@ -124,7 +125,7 @@ static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
return CMD_RET_SUCCESS;
}
-static int adtimg_get_dt_by_index(int argc, char * const argv[])
+static int adtimg_get_dt_by_index(int argc, char *const argv[])
{
ulong addr;
u32 index, size;
@@ -163,7 +164,7 @@ static int adtimg_get_dt_by_index(int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int adtimg_get_dt(int argc, char * const argv[])
+static int adtimg_get_dt(int argc, char *const argv[])
{
if (argc < 2) {
printf("Error: No options passed to '%s'\n", argv[0]);
@@ -181,8 +182,8 @@ static int adtimg_get_dt(int argc, char * const argv[])
return CMD_RET_FAILURE;
}
-static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_get(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc < 2) {
printf("Error: No arguments passed to '%s'\n", argv[0]);
@@ -203,15 +204,16 @@ static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_adtimg_sub[] = {
+static struct cmd_tbl cmd_adtimg_sub[] = {
U_BOOT_CMD_MKENT(addr, CONFIG_SYS_MAXARGS, 1, do_adtimg_addr, "", ""),
U_BOOT_CMD_MKENT(dump, CONFIG_SYS_MAXARGS, 1, do_adtimg_dump, "", ""),
U_BOOT_CMD_MKENT(get, CONFIG_SYS_MAXARGS, 1, do_adtimg_get, "", ""),
};
-static int do_adtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_adtimg(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
cp = find_cmd_tbl(argv[1], cmd_adtimg_sub, ARRAY_SIZE(cmd_adtimg_sub));