aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/spi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi')
-rw-r--r--drivers/mtd/spi/spi-nor-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 6acaa84d2b0..a70fbda4bbc 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -3707,8 +3707,9 @@ int spi_nor_scan(struct spi_nor *nor)
int ret;
int cfi_mtd_nb = 0;
- if (IS_ENABLED(CONFIG_FLASH_CFI_MTD))
- cfi_mtd_nb = CFI_FLASH_BANKS;
+#ifdef CONFIG_FLASH_CFI_MTD
+ cfi_mtd_nb = CFI_FLASH_BANKS;
+#endif
/* Reset SPI protocol for all commands. */
nor->reg_proto = SNOR_PROTO_1_1_1;