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/power | |
parent | 691d719db7183dfb1d1360efed4c5e9f6899095f (diff) | |
download | u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.gz |
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/power')
-rw-r--r-- | drivers/power/axp152.c | 2 | ||||
-rw-r--r-- | drivers/power/axp209.c | 2 | ||||
-rw-r--r-- | drivers/power/axp221.c | 2 | ||||
-rw-r--r-- | drivers/power/axp809.c | 3 | ||||
-rw-r--r-- | drivers/power/axp818.c | 3 | ||||
-rw-r--r-- | drivers/power/mt6323.c | 2 | ||||
-rw-r--r-- | drivers/power/power_core.c | 4 | ||||
-rw-r--r-- | drivers/power/twl4030.c | 3 |
8 files changed, 13 insertions, 8 deletions
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c index 361be6c31c..d6e36125c1 100644 --- a/drivers/power/axp152.c +++ b/drivers/power/axp152.c @@ -79,7 +79,7 @@ int axp_init(void) return 0; } -int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { pmic_bus_write(AXP152_SHUTDOWN, AXP152_POWEROFF); diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c index 67b420910c..60f69ec27a 100644 --- a/drivers/power/axp209.c +++ b/drivers/power/axp209.c @@ -229,7 +229,7 @@ int axp_init(void) return 0; } -int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { pmic_bus_write(AXP209_SHUTDOWN, AXP209_POWEROFF); diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c index c440047d36..3446fe7365 100644 --- a/drivers/power/axp221.c +++ b/drivers/power/axp221.c @@ -264,7 +264,7 @@ int axp_get_sid(unsigned int *sid) return 0; } -int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { pmic_bus_write(AXP221_SHUTDOWN, AXP221_SHUTDOWN_POWEROFF); diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c index 7de92f4f61..6323492b66 100644 --- a/drivers/power/axp809.c +++ b/drivers/power/axp809.c @@ -11,6 +11,7 @@ */ #include <common.h> +#include <command.h> #include <errno.h> #include <asm/arch/gpio.h> #include <asm/arch/pmic_bus.h> @@ -219,7 +220,7 @@ int axp_init(void) return pmic_bus_init(); } -int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { pmic_bus_write(AXP809_SHUTDOWN, AXP809_SHUTDOWN_POWEROFF); diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c index 834919ddd4..0531707c8a 100644 --- a/drivers/power/axp818.c +++ b/drivers/power/axp818.c @@ -11,6 +11,7 @@ */ #include <common.h> +#include <command.h> #include <errno.h> #include <asm/arch/gpio.h> #include <asm/arch/pmic_bus.h> @@ -255,7 +256,7 @@ int axp_init(void) return 0; } -int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { pmic_bus_write(AXP818_SHUTDOWN, AXP818_SHUTDOWN_POWEROFF); diff --git a/drivers/power/mt6323.c b/drivers/power/mt6323.c index 566be5f39e..f5b27548d3 100644 --- a/drivers/power/mt6323.c +++ b/drivers/power/mt6323.c @@ -17,7 +17,7 @@ #define RTC_BBPU_KEY (0x43 << 8) #define RTC_WRTGR 0x003c -int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { u32 addr, val; diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c index 095d8a51be..5a18dedada 100644 --- a/drivers/power/power_core.c +++ b/drivers/power/power_core.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <command.h> #include <malloc.h> #include <linux/types.h> #include <linux/list.h> @@ -120,7 +121,8 @@ static void pmic_list_names(void) } } -static int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_pmic(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { u32 ret, reg, val; char *cmd, *name; diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c index 42c9001518..4cc261aced 100644 --- a/drivers/power/twl4030.c +++ b/drivers/power/twl4030.c @@ -22,6 +22,7 @@ * Syed Mohammed Khasim <khasim at ti.com> */ +#include <command.h> #include <twl4030.h> /* @@ -172,7 +173,7 @@ void twl4030_power_mmc_init(int dev_index) } #ifdef CONFIG_CMD_POWEROFF -int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { twl4030_power_off(); |