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/sf.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'cmd/sf.c') diff --git a/cmd/sf.c b/cmd/sf.c index 69e0d46a55..367df576b8 100644 --- a/cmd/sf.c +++ b/cmd/sf.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -81,7 +82,7 @@ static ulong bytes_per_second(unsigned int len, ulong start_ms) return 1024 * len / max(get_timer(start_ms), 1UL); } -static int do_spi_flash_probe(int argc, char * const argv[]) +static int do_spi_flash_probe(int argc, char *const argv[]) { unsigned int bus = CONFIG_SF_DEFAULT_BUS; unsigned int cs = CONFIG_SF_DEFAULT_CS; @@ -261,7 +262,7 @@ static int spi_flash_update(struct spi_flash *flash, u32 offset, return 0; } -static int do_spi_flash_read_write(int argc, char * const argv[]) +static int do_spi_flash_read_write(int argc, char *const argv[]) { unsigned long addr; void *buf; @@ -319,7 +320,7 @@ static int do_spi_flash_read_write(int argc, char * const argv[]) return ret == 0 ? 0 : 1; } -static int do_spi_flash_erase(int argc, char * const argv[]) +static int do_spi_flash_erase(int argc, char *const argv[]) { int ret; int dev = 0; @@ -351,7 +352,7 @@ static int do_spi_flash_erase(int argc, char * const argv[]) return ret == 0 ? 0 : 1; } -static int do_spi_protect(int argc, char * const argv[]) +static int do_spi_protect(int argc, char *const argv[]) { int ret = 0; loff_t start, len; @@ -500,7 +501,7 @@ static int spi_flash_test(struct spi_flash *flash, uint8_t *buf, ulong len, return 0; } -static int do_spi_flash_test(int argc, char * const argv[]) +static int do_spi_flash_test(int argc, char *const argv[]) { unsigned long offset; unsigned long len; @@ -544,8 +545,8 @@ static int do_spi_flash_test(int argc, char * const argv[]) } #endif /* CONFIG_CMD_SF_TEST */ -static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_spi_flash(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *cmd; int ret; -- cgit