changeset 143:5817b3173bfd

Add Nick's yaffs1 autoselection
author charles
date Mon, 05 Jun 2006 05:12:44 +0100
parents 54b79fbd8c33
children 1ac3b3f66ac1
files yaffs_fs.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_fs.c
+++ b/yaffs_fs.c
@@ -66,6 +66,11 @@ extern const char *yaffs_guts_c_version;
 #define	BDEVNAME_SIZE		0
 #define	yaffs_devname(sb, buf)	kdevname(sb->s_dev)
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+/* added NCB 26/5/2006 for 2.4.25-vrs2-tcl1 kernel */
+#define __user
+#endif
+
 #endif
 
 #include <asm/uaccess.h>
@@ -1459,6 +1464,14 @@ static struct super_block *yaffs_interna
 	    T(YAFFS_TRACE_ALWAYS,("yaffs: auto selecting yaffs2\n"));
 	    yaffsVersion = 2;
 	}	
+	
+	/* Added NCB 26/5/2006 for completeness */
+	if (yaffsVersion == 2 && 
+	    mtd->oobblock == 512) {
+	    T(YAFFS_TRACE_ALWAYS,("yaffs: auto selecting yaffs1\n"));
+	    yaffsVersion = 1;
+	}	
+
 #endif
 
 	if (yaffsVersion == 2) {