JFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.
PATCH 1/1 JFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.
---
Applied to u-boot-nand-flash
fs/jffs2/jffs2_1pass.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-)
fs/jffs2/jffs2_1pass.c +5 -7
@@ -449,20 +449,18 @@ static inline void *get_node_mem(u32 off)static inline void put_fl_mem (void *buf) { -#if defined(CONFIG_JFFS2_NAND ) && \ - defined(CONFIG_CMD_NAND )struct mtdids *id = current_part->dev->id; -if (id->type ==MTD_DEV_TYPE_NAND ) +switch (id->type) { +#if defined(CONFIG_JFFS2_NAND ) && defined(CONFIG_CMD_NAND ) +case MTD_DEV_TYPE_NAND :return put_fl_mem_nand (buf);#endif -#if defined(CONFIG_CMD_ONENAND ) -struct mtdids *id = current_part->dev->id; - -if (id->type ==MTD_DEV_TYPE_ONENAND ) +case MTD_DEV_TYPE_ONENAND :return put_fl_mem_onenand (buf);#endif + } }/* Compression names */
Signature · 1 line
1.5.6.rc1.6.gc53ad
PATCH 1/1 JFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.
Quoted 2 lines
Eliminate compiler error when both NAND and OneNAND are enabled.
Thanks. I've done it differently this morning (without warning), but yours is better.
I adopted your suggestion and submitted the patch to nand.h, it works for me (although I'm still missing the two drivers for the board).
Quoted 1 line
Reported-by:
I didn't find a policy for "Reported-by:" or other tags besides
Signed-off-by: and Acked-by: . Mine are surely wronh in the patch I sent. Any pointer for us to get a culture?
Thanks
/alessandro
PATCH 1/1 JFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.
Quoted 5 lines · Alessandro Rubini
Quoted 1 line
Reported-by:
I didn't find a policy for "Reported-by:" or other tags besides
Signed-off-by: and Acked-by: . Mine are surely wronh in the patch I sent. Any pointer for us to get a culture?
I don't think it's anything as official as those other two; just a way of providing the information concisely (similar to Tested-by).
-Scott