From: Roman Stratiienko Date: Sat, 8 May 2021 22:25:24 +0000 (+0300) Subject: fastboot: fix fastboot_set_reboot_flag() X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=51566bc8c37205d73f45ee97409063fedc1cdfd8;p=u-boot.git fastboot: fix fastboot_set_reboot_flag() In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition is not met and fastboot_set_reboot_flag() fails. Fixes: a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag") Signed-off-by: Roman Stratiienko Reviewed-by: Sean Anderson Tested-by: Mattijs Korpershoek --- diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index cbcc3683c4..ef399d0c4a 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -91,7 +91,7 @@ void fastboot_okay(const char *reason, char *response) */ int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { -#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC_DEV) +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV static const char * const boot_cmds[] = { [FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader", [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",