From: Wolfgang Denk Date: Tue, 9 Aug 2005 19:41:20 +0000 (+0200) Subject: Make new "mtdparts" code build with older compilers X-Git-Tag: v2025.01-rc5-pxa1908~23299^2~20 X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=c4e0e6860429da7fd7a53b8c1d7026a449e78bf1;p=u-boot.git Make new "mtdparts" code build with older compilers Patch by Andrea Scian, 09 Aug 2005 --- diff --git a/CHANGELOG b/CHANGELOG index 6bd7329d4a..7027ea332e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.3: ====================================================================== +* Make new "mtdparts" code build with older compilers + Patch by Andrea Scian, 09 Aug 2005 + * Changed CONFIG_440_GX, CONFIG_440_EP and CONFIG_440_GR options to CONFIG_44GX, CONFIG_440EP and CONFIG_440GR for a consistent design with the 405 defines and the linux kernel defines. diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index 21eacc2f16..7f5ebf90eb 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";