spl: Add a parameter to spl_parse_image_header()
Instead of using the global spl_image variable, pass the required struct in
as an argument.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c
index f97e1ef..5198bab 100644
--- a/common/spl/spl_ubi.c
+++ b/common/spl/spl_ubi.c
@@ -54,7 +54,7 @@
ret = ubispl_load_volumes(&info, volumes, 2);
if (!ret) {
header = (struct image_header *)volumes[0].load_addr;
- spl_parse_image_header(header);
+ spl_parse_image_header(&spl_image, header);
puts("Linux loaded.\n");
goto out;
}
@@ -68,7 +68,7 @@
ret = ubispl_load_volumes(&info, volumes, 1);
if (!ret)
- spl_parse_image_header(header);
+ spl_parse_image_header(&spl_image, header);
out:
#ifdef CONFIG_SPL_NAND_SUPPORT
if (boot_device == BOOT_DEVICE_NAND)