aboutsummaryrefslogtreecommitdiff
path: root/common/spl/spl_nand.c
diff options
context:
space:
mode:
authorSimon Glass2016-09-24 18:19:53 -0600
committerTom Rini2016-10-06 14:48:17 -0400
commit71316c1d8c1799b444d14cfb00eaacb6cf1ce44a (patch)
treed7c0b1c644dfdeed26c7cfe5804a7dbdd8584026 /common/spl/spl_nand.c
parentd95ceb97c0ca158605372634a860651ca925915a (diff)
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>
Diffstat (limited to 'common/spl/spl_nand.c')
-rw-r--r--common/spl/spl_nand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 8f9bd5da333..f25220f1721 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -59,7 +59,7 @@ static int spl_nand_load_element(int offset, struct image_header *header)
load.read = spl_nand_fit_read;
return spl_load_simple_fit(&load, offset, header);
} else {
- err = spl_parse_image_header(header);
+ err = spl_parse_image_header(&spl_image, header);
if (err)
return err;
return nand_spl_load_image(offset, spl_image.size,
@@ -107,7 +107,7 @@ int spl_nand_load_image(void)
/* load linux */
nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
sizeof(*header), (void *)header);
- err = spl_parse_image_header(header);
+ err = spl_parse_image_header(&spl_image, header);
if (err)
return err;
if (header->ih_os == IH_OS_LINUX) {