mtd: cfi: introduce CFI_FLASH_BANKS
Replace CONFIG_SYS_MAX_FLASH_BANKS by CFI_FLASH_BANKS to prepare
Kconfig migration and avoid to redefine CONFIG_SYS_MAX_FLASH_BANKS
in cfi_flash.h.
After this patch CONFIG_SYS_MAX_FLASH_BANKS should be never used in
the cfi code: use CFI_MAX_FLASH_BANKS for struct size or CFI_FLASH_BANKS
for number of CFI banks which can be dynamic.
This patch modify all the files which include mtd/cfi_flash.h.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
diff --git a/drivers/mtd/cfi_mtd.c b/drivers/mtd/cfi_mtd.c
index 2295bb7..f998ffa 100644
--- a/drivers/mtd/cfi_mtd.c
+++ b/drivers/mtd/cfi_mtd.c
@@ -207,10 +207,10 @@
int error, i;
#ifdef CONFIG_MTD_CONCAT
int devices_found = 0;
- struct mtd_info *mtd_list[CONFIG_SYS_MAX_FLASH_BANKS];
+ struct mtd_info *mtd_list[CFI_FLASH_BANKS];
#endif
- for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
+ for (i = 0; i < CFI_FLASH_BANKS; i++) {
fi = &flash_info[i];
mtd = &cfi_mtd_info[i];