]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/cfi_mtd.c
Merge branch 'tpm' of git://git.denx.de/u-boot-x86
[karo-tx-uboot.git] / drivers / mtd / cfi_mtd.c
index cbcc165c7efd4df7fcbfbf4135f8427e337628ad..8d74fa94128a7348de33a4051ba3ef3f13d805a6 100644 (file)
@@ -222,8 +222,10 @@ int cfi_mtd_init(void)
        struct mtd_info *mtd;
        flash_info_t *fi;
        int error, i;
+#ifdef CONFIG_MTD_CONCAT
        int devices_found = 0;
        struct mtd_info *mtd_list[CONFIG_SYS_MAX_FLASH_BANKS];
+#endif
 
        for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
                fi = &flash_info[i];
@@ -253,7 +255,9 @@ int cfi_mtd_init(void)
                if (add_mtd_device(mtd))
                        return -ENOMEM;
 
+#ifdef CONFIG_MTD_CONCAT
                mtd_list[devices_found++] = mtd;
+#endif
        }
 
 #ifdef CONFIG_MTD_CONCAT