diff mbox series

[088/171] Correct SPL uses of FASTBOOT_FLASH_NAND

Message ID 20230130144324.206208-89-sjg@chromium.org
State Changes Requested
Headers show
Series Kconfig: More cleanup of CONFIG options | expand

Commit Message

Simon Glass Jan. 30, 2023, 2:42 p.m. UTC
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_FASTBOOT_FLASH_NAND defined in Kconfig

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

 drivers/fastboot/fb_command.c | 4 ++--
 drivers/fastboot/fb_getvar.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Mattijs Korpershoek Jan. 31, 2023, 4:58 p.m. UTC | #1
On Mon, Jan 30, 2023 at 07:42, Simon Glass <sjg@chromium.org> wrote:

> This converts 3 usages of this option to the non-SPL form, since there is
> no SPL_FASTBOOT_FLASH_NAND defined in Kconfig
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
>
>  drivers/fastboot/fb_command.c | 4 ++--
>  drivers/fastboot/fb_getvar.c  | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
> index 5a3fb69b3f7..71cfaec6e9d 100644
> --- a/drivers/fastboot/fb_command.c
> +++ b/drivers/fastboot/fb_command.c
> @@ -299,7 +299,7 @@ static void __maybe_unused flash(char *cmd_parameter, char *response)
>  		fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
>  					 image_size, response);
>  
> -	if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND))
> +	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
>  		fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
>  					  image_size, response);
>  }
> @@ -318,7 +318,7 @@ static void __maybe_unused erase(char *cmd_parameter, char *response)
>  	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
>  		fastboot_mmc_erase(cmd_parameter, response);
>  
> -	if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND))
> +	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
>  		fastboot_nand_erase(cmd_parameter, response);
>  }
>  
> diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
> index de4879dadfb..dd3475e0a8b 100644
> --- a/drivers/fastboot/fb_getvar.c
> +++ b/drivers/fastboot/fb_getvar.c
> @@ -104,7 +104,7 @@ static int getvar_get_part_info(const char *part_name, char *response,
>  					       response);
>  		if (r >= 0 && size)
>  			*size = disk_part.size * disk_part.blksz;
> -	} else if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND)) {
> +	} else if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND)) {
>  		r = fastboot_nand_get_part_info(part_name, &part_info, response);
>  		if (r >= 0 && size)
>  			*size = part_info->size;
> -- 
> 2.39.1.456.gfc5497dd1b-goog
diff mbox series

Patch

diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 5a3fb69b3f7..71cfaec6e9d 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -299,7 +299,7 @@  static void __maybe_unused flash(char *cmd_parameter, char *response)
 		fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
 					 image_size, response);
 
-	if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND))
+	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
 		fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
 					  image_size, response);
 }
@@ -318,7 +318,7 @@  static void __maybe_unused erase(char *cmd_parameter, char *response)
 	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
 		fastboot_mmc_erase(cmd_parameter, response);
 
-	if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND))
+	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
 		fastboot_nand_erase(cmd_parameter, response);
 }
 
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index de4879dadfb..dd3475e0a8b 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -104,7 +104,7 @@  static int getvar_get_part_info(const char *part_name, char *response,
 					       response);
 		if (r >= 0 && size)
 			*size = disk_part.size * disk_part.blksz;
-	} else if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND)) {
+	} else if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND)) {
 		r = fastboot_nand_get_part_info(part_name, &part_info, response);
 		if (r >= 0 && size)
 			*size = part_info->size;