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