From 56df46351ad56551f8ea7e54d217ea6b709e686c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Sep 2016 18:20:06 -0600 Subject: spl: Convert spl_usb_load_image() to use linker list Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- common/spl/spl_usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/spl/spl_usb.c') diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c index f990336a3c..2bc321ac5b 100644 --- a/common/spl/spl_usb.c +++ b/common/spl/spl_usb.c @@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR; static int usb_stor_curr_dev = -1; /* current device */ #endif -int spl_usb_load_image(struct spl_boot_device *bootdev) +static int spl_usb_load_image(struct spl_boot_device *bootdev) { int err; struct blk_desc *stor_dev; @@ -61,3 +61,4 @@ int spl_usb_load_image(struct spl_boot_device *bootdev) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USB, spl_usb_load_image); -- cgit v1.2.3