diff mbox

[U-Boot,09/27] spl: Convert spl_ram_load_image() to use linker list

Message ID 1474227917-9256-10-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Sept. 18, 2016, 7:44 p.m. UTC
Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/spl/spl.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 719ae6e..4fe5d98 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -215,6 +215,7 @@  static int spl_ram_load_image(struct spl_boot_device *bootdev)
 
 	return 0;
 }
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image);
 #endif
 
 int spl_init(void)
@@ -372,10 +373,6 @@  static int spl_load_image(u32 boot_device)
 		return loader->load_image(&bootdev);
 
 	switch (boot_device) {
-#ifdef CONFIG_SPL_RAM_DEVICE
-	case BOOT_DEVICE_RAM:
-		return spl_ram_load_image(&bootdev);
-#endif
 #ifdef CONFIG_SPL_MMC_SUPPORT
 	case BOOT_DEVICE_MMC1:
 	case BOOT_DEVICE_MMC2: