common: board_r: Drop initr_jumptable wrapper
authorOvidiu Panait <ovidiu.panait@windriver.com>
Sat, 28 Nov 2020 08:43:15 +0000 (10:43 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 15 Jan 2021 19:36:12 +0000 (14:36 -0500)
Add a return value to jumptable_init and use it directly in the
post-relocation init sequence, rather than using a wrapper stub.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/board_r.c
common/exports.c
include/exports.h

index a5cbbcc..32ad40d 100644 (file)
@@ -490,12 +490,6 @@ static int initr_malloc_bootparams(void)
 }
 #endif
 
-static int initr_jumptable(void)
-{
-       jumptable_init();
-       return 0;
-}
-
 #if defined(CONFIG_API)
 static int initr_api(void)
 {
@@ -757,7 +751,7 @@ static init_fnc_t init_sequence_r[] = {
        pci_init,
 #endif
        stdio_add_devices,
-       initr_jumptable,
+       jumptable_init,
 #ifdef CONFIG_API
        initr_api,
 #endif
index 6253b55..4578f07 100644 (file)
@@ -25,8 +25,10 @@ unsigned long get_version(void)
 # define miiphy_set_current_dev                dummy
 #endif
 
-void jumptable_init(void)
+int jumptable_init(void)
 {
        gd->jt = malloc(sizeof(struct jt_funcs));
 #include <_exports.h>
+
+       return 0;
 }
index b300554..faf0f59 100644 (file)
 struct cmd_tbl;
 struct spi_slave;
 
-/* Set up the jump table for use by the API */
-void jumptable_init(void);
+/**
+ * jumptable_init() - Set up the jump table for use by the API
+ *
+ * It is called during the generic post-relocation init sequence.
+ *
+ * Return: 0 if OK
+ */
+int jumptable_init(void);
 
 /* These are declarations of exported functions available in C code */
 unsigned long get_version(void);