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>
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c
index 361be6c..d6e3612 100644
--- a/drivers/power/axp152.c
+++ b/drivers/power/axp152.c
@@ -79,7 +79,7 @@
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 67b4209..60f69ec 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -229,7 +229,7 @@
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 c440047..3446fe7 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -264,7 +264,7 @@
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 7de92f4..6323492 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 @@
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 834919d..0531707 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 @@
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 566be5f..f5b2754 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 095d8a5..5a18ded 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 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 42c9001..4cc261a 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 @@
}
#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();