diff options
author | Wolfgang Denk <wd@denx.de> | 2009-07-19 19:32:37 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-07-19 19:36:14 +0200 |
commit | 1a4664b53aaf23687b52d64b94be06a9aa260b86 (patch) | |
tree | 95a91a5ca4014c21d8367844c6dd1e62fab2a28c /common/cmd_flash.c | |
parent | 341245a28830d3261c41b09d958eeea7bb93587a (diff) | |
download | u-boot-imx-1a4664b53aaf23687b52d64b94be06a9aa260b86.zip u-boot-imx-1a4664b53aaf23687b52d64b94be06a9aa260b86.tar.gz u-boot-imx-1a4664b53aaf23687b52d64b94be06a9aa260b86.tar.bz2 |
cmd_flash.c: fix fix compile error for boards with DataFlash
Commit 5669ed45 ("cmd_flash.c: fix warning: unused variable
'addr_first'/'addr_last'") changed the #ifdef logic areound the
declaration of these variables and missed a combination of settings
of HAS_DATAFLASH with SYS_NO_FLASH; this patch fixes this.
Also spotted by Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common/cmd_flash.c')
-rw-r--r-- | common/cmd_flash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/cmd_flash.c b/common/cmd_flash.c index bc651fa..3773412 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -467,8 +467,10 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) flash_info_t *info; ulong bank; int i, n, sect_first, sect_last; - ulong addr_first, addr_last; #endif /* CONFIG_SYS_NO_FLASH */ +#if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH) + ulong addr_first, addr_last; +#endif #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS) struct mtd_device *dev; struct part_info *part; |