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 <r.stratiienko@gmail.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
Roman Stratiienko 2021-05-09 01:25:24 +03:00 committed by Tom Rini
parent 761a1786e1
commit 51566bc8c3

View File

@ -91,7 +91,7 @@ void fastboot_okay(const char *reason, char *response)
*/ */
int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) 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[] = { static const char * const boot_cmds[] = {
[FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader", [FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader",
[FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot", [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",