diff options
author | Justin Waters <justin@justin-linux.(none)> | 2008-01-21 16:38:46 -0500 |
---|---|---|
committer | Justin Waters <justin@justin-linux.(none)> | 2008-01-22 11:25:35 -0500 |
commit | 405bb978ee2321b6cf5381a012c812bdc7679e40 (patch) | |
tree | fcab2b9817cbadafc512f39972468ea9ccecc8d5 /common | |
parent | 3c7ac4df9c9718e0bf11705a1a4d0e4b9dae700f (diff) |
Fix various configuration problems with Atmel patch
The CMD API has changed significantly since the patches were originally written. This fixes these problems and cleans up the code a little.
Signed-off-by: Justin Waters <justin.waters@timesys.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_flash.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 817157c1c35..4f9d517b0fa 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -455,9 +455,14 @@ int flash_sect_erase (ulong addr_first, ulong addr_last) int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { #ifndef CFG_NO_FLASH - flash_info_t *info; - ulong bank, addr_first, addr_last; - int i, p, n, sect_first, sect_last; + flash_info_t *info; + ulong bank, addr_first, addr_last; + int i, p, n, sect_first, sect_last; +#else + ulong addr_first, addr_last; + int p; +#endif + #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE) struct mtd_device *dev; struct part_info *part; |