diff options
author | Simon Glass <sjg@chromium.org> | 2016-11-30 15:30:52 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-12-09 08:40:15 -0500 |
commit | 29d357d7bfa5e942ecc8cf735c3742658faa1b78 (patch) | |
tree | 9b93f22d17d7d7a8a9314e8f7971372847b35b69 | |
parent | 540bfe7daaadafd83fadb5b0e2e8b6e7af017768 (diff) |
spl: Pass the loader into spl_load_image()
Rather than have this function figure out the correct loader again, pass
it in as a parameter.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/spl/spl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 80c85adb0a..435534bff8 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -367,12 +367,12 @@ static struct spl_image_loader *spl_ll_find_loader(uint boot_device) return NULL; } -static int spl_load_image(struct spl_image_info *spl_image, u32 boot_device) +static int spl_load_image(struct spl_image_info *spl_image, + struct spl_image_loader *loader) { struct spl_boot_device bootdev; - struct spl_image_loader *loader = spl_ll_find_loader(boot_device); - bootdev.boot_device = boot_device; + bootdev.boot_device = loader->boot_device; bootdev.boot_device_name = NULL; return loader->load_image(spl_image, &bootdev); @@ -400,7 +400,7 @@ static int boot_from_devices(struct spl_image_info *spl_image, if (!loader) puts("SPL: Unsupported Boot Device!\n"); #endif - if (loader && !spl_load_image(spl_image, spl_boot_list[i])) + if (loader && !spl_load_image(spl_image, loader)) return 0; } |