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 /drivers/gpio/tca642x.c | |
parent | 691d719db7183dfb1d1360efed4c5e9f6899095f (diff) | |
download | u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.gz u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.bz2 u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.zip |
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 'drivers/gpio/tca642x.c')
-rw-r--r-- | drivers/gpio/tca642x.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpio/tca642x.c b/drivers/gpio/tca642x.c index 730460a999..463cfe879a 100644 --- a/drivers/gpio/tca642x.c +++ b/drivers/gpio/tca642x.c @@ -21,6 +21,7 @@ */ #include <common.h> +#include <command.h> #include <i2c.h> #include <tca642x.h> @@ -212,7 +213,7 @@ static int tca642x_info(uchar chip) return 0; } -static cmd_tbl_t cmd_tca642x[] = { +static struct cmd_tbl cmd_tca642x[] = { U_BOOT_CMD_MKENT(device, 3, 0, (void *)TCA642X_CMD_DEVICE, "", ""), U_BOOT_CMD_MKENT(output, 4, 0, (void *)TCA642X_CMD_OUTPUT, "", ""), U_BOOT_CMD_MKENT(input, 3, 0, (void *)TCA642X_CMD_INPUT, "", ""), @@ -220,7 +221,8 @@ static cmd_tbl_t cmd_tca642x[] = { U_BOOT_CMD_MKENT(info, 2, 0, (void *)TCA642X_CMD_INFO, "", ""), }; -static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_tca642x(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { static uchar chip = CONFIG_SYS_I2C_TCA642X_ADDR; int ret = CMD_RET_USAGE, val; @@ -228,7 +230,7 @@ static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) uint8_t bank_shift; ulong ul_arg2 = 0; ulong ul_arg3 = 0; - cmd_tbl_t *c; + struct cmd_tbl *c; c = find_cmd_tbl(argv[1], cmd_tca642x, ARRAY_SIZE(cmd_tca642x)); |