diff options
author | Simon Glass | 2020-05-10 11:40:03 -0600 |
---|---|---|
committer | Tom Rini | 2020-05-18 18:36:55 -0400 |
commit | 09140113108541b95d340f3c7b6ee597d31ccc73 (patch) | |
tree | 4b4241b799bbbb2eeef4164392442b193af1703f /cmd/sf.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/sf.c')
-rw-r--r-- | cmd/sf.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -6,6 +6,7 @@ */ #include <common.h> +#include <command.h> #include <div64.h> #include <dm.h> #include <flash.h> @@ -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; |