spl: Create a function to init spl_load_info
Rather than having every caller set this up individually, create a common init function. This allows new fields to be added without the risk of them being left uninited. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
This commit is contained in:
@@ -43,9 +43,7 @@ static int spl_smh_load_image(struct spl_image_info *spl_image,
|
||||
}
|
||||
len = ret;
|
||||
|
||||
load.read = smh_fit_read;
|
||||
spl_set_bl_len(&load, 1);
|
||||
load.priv = &fd;
|
||||
spl_load_init(&load, smh_fit_read, &fd, 1);
|
||||
ret = spl_load(spl_image, bootdev, &load, len, 0);
|
||||
if (ret)
|
||||
log_debug("could not read %s: %d\n", filename, ret);
|
||||
|
||||
Reference in New Issue
Block a user