Initialize the field eccbytes in nand_oobinfo.
authorluc <luc>
Tue, 2 Aug 2005 19:17:55 +0000 (19:17 +0000)
committerluc <luc>
Tue, 2 Aug 2005 19:17:55 +0000 (19:17 +0000)
Required to specify eccbytes for current MTD version, otherwise ECC will fail.

Thanks to Artis Kugevics.

yaffs_mtdif.c

index 4c87542e71b5e525cd12dbd569b59e23fc85de0a..5d1777ec6387f39d6b49a0034655f0aea707caf6 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.7 2005-08-01 20:52:35 luc Exp $";
+const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.8 2005-08-02 19:17:55 luc Exp $";
  
 #include "yportenv.h"
 
@@ -28,6 +28,9 @@ const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.7 2005-08-01 20:52:3
 
 static struct nand_oobinfo yaffs_oobinfo = {
        .useecc = 1,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8))
+       .eccbytes = 6,
+#endif
        .eccpos = {8, 9, 10, 13, 14, 15}
 };