提交 9578718c 编写于 作者: K Kim Phillips 提交者: Stefan Roese

mtd: cfi - if defined, use MAX_FLASH_BANKS_DETECT for static declarations

a.k.a cfi_mtd.c does as cfi_flash.c does.  This also prevents
the TQM834x build from doing a:

cfi_mtd.c:36: error: variably modified 'cfi_mtd_info' at file scope
cfi_mtd.c:37: error: variably modified 'cfi_mtd_names' at file scope

using gcc 4.4.
Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
Signed-off-by: NStefan Roese <sr@denx.de>
上级 7d4450a9
......@@ -31,10 +31,17 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/concat.h>
/* use CONFIG_SYS_MAX_FLASH_BANKS_DETECT if defined */
#ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
# define CFI_MAX_FLASH_BANKS CONFIG_SYS_MAX_FLASH_BANKS_DETECT
#else
# define CFI_MAX_FLASH_BANKS CONFIG_SYS_MAX_FLASH_BANKS
#endif
extern flash_info_t flash_info[];
static struct mtd_info cfi_mtd_info[CONFIG_SYS_MAX_FLASH_BANKS];
static char cfi_mtd_names[CONFIG_SYS_MAX_FLASH_BANKS][16];
static struct mtd_info cfi_mtd_info[CFI_MAX_FLASH_BANKS];
static char cfi_mtd_names[CFI_MAX_FLASH_BANKS][16];
#ifdef CONFIG_MTD_CONCAT
static char c_mtd_name[16];
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册