In our U-Boot v1 OMAP3 patch set in Steve's git we have the fs/jffs2/jffs2_1pass.c [1] change below. I now wonder what this is good for and if it will be accepted upstream? Any idea?
Thanks
Dirk
Btw.: Seems that there is a typo in "ONFIG_CMD_FLASH", too?
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index 7e27ee1..e552e08 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -303,7 +303,9 @@ static inline void *get_node_mem_nor(u32 off)
*/
static inline void *get_fl_mem(u32 off, u32 size, void *ext_buf)
{
+#if (defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)) || defined(ONFIG_CMD_FLASH)
struct mtdids *id = current_part->dev->id;
+#endif
#if defined(CONFIG_CMD_FLASH)
if (id->type == MTD_DEV_TYPE_NOR)
@@ -321,7 +323,9 @@ static inline void *get_fl_mem(u32 off, u32 size, void *ext_buf)
static inline void *get_node_mem(u32 off)
{
- struct mtdids *id = current_part->dev->id;
+#if (defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)) || defined(ONFIG_CMD_FLASH)
+ struct mtdids *id = current_part->dev->id;
+#endif
#if defined(CONFIG_CMD_FLASH)
if (id->type == MTD_DEV_TYPE_NOR)