summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-08-09 21:41:20 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-08-09 21:41:20 +0200
commitc4e0e6860429da7fd7a53b8c1d7026a449e78bf1 (patch)
treec4b4127e19cbc4f84d66422e0bd260008d3c7b37 /common
parent38ec37d0f1ba3cb7e7d3766d62e01ededbdcbd1d (diff)
downloadu-boot-imx-c4e0e6860429da7fd7a53b8c1d7026a449e78bf1.zip
u-boot-imx-c4e0e6860429da7fd7a53b8c1d7026a449e78bf1.tar.gz
u-boot-imx-c4e0e6860429da7fd7a53b8c1d7026a449e78bf1.tar.bz2
Make new "mtdparts" code build with older compilers
Patch by Andrea Scian, 09 Aug 2005
Diffstat (limited to 'common')
-rw-r--r--common/cmd_jffs2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index 21eacc2..7f5ebf9 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -1627,6 +1627,9 @@ int mtdparts_init(void)
DEBUGF("\n---mtdparts_init---\n");
if (!initialized) {
+ struct mtdids *id;
+ struct part_info *part;
+
initialized = 1;
current_dev = (struct mtd_device *)
malloc(sizeof(struct mtd_device) +
@@ -1639,8 +1642,8 @@ int mtdparts_init(void)
memset(current_dev, 0, sizeof(struct mtd_device) +
sizeof(struct part_info) + sizeof(struct mtdids));
- struct mtdids *id = (struct mtdids *)(current_dev + 1);
- struct part_info *part = (struct part_info *)(id + 1);
+ id = (struct mtdids *)(current_dev + 1);
+ part = (struct part_info *)(id + 1);
/* id */
id->mtd_id = "single part";