From ecdfd69a4be55363589e8185ff151b02e6c36cfa Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Sep 2016 18:19:57 -0600 Subject: spl: Convert boot_device into a struct At present some spl_xxx_load_image() functions take a parameter and some don't. Of those that do, most take an integer but one takes a string. Convert this parameter into a struct so that we can pass all functions the same thing. This will allow us to use a common function signature. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- common/spl/spl_ubi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/spl/spl_ubi.c') diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c index 5198bab..d64e6cf 100644 --- a/common/spl/spl_ubi.c +++ b/common/spl/spl_ubi.c @@ -12,14 +12,14 @@ #include #include -int spl_ubi_load_image(u32 boot_device) +int spl_ubi_load_image(struct spl_boot_device *bootdev) { struct image_header *header; struct ubispl_info info; struct ubispl_load volumes[2]; int ret = 1; - switch (boot_device) { + switch (bootdev->boot_device) { #ifdef CONFIG_SPL_NAND_SUPPORT case BOOT_DEVICE_NAND: nand_init(); @@ -71,7 +71,7 @@ int spl_ubi_load_image(u32 boot_device) spl_parse_image_header(&spl_image, header); out: #ifdef CONFIG_SPL_NAND_SUPPORT - if (boot_device == BOOT_DEVICE_NAND) + if (bootdev->boot_device == BOOT_DEVICE_NAND) nand_deselect(); #endif return ret; -- cgit v1.1