summaryrefslogtreecommitdiff
path: root/yaffs_mtdif.c
diff options
context:
space:
mode:
authorluc <luc>2005-08-02 19:17:55 +0000
committerluc <luc>2005-08-02 19:17:55 +0000
commitbe543b3cc9f7075461ad0a830fd1aa54711eab95 (patch)
treec9726fe7fed71d04bff0fe70414a814e1e470ae2 /yaffs_mtdif.c
parent17980527e964732381ef3fe6d1f2946bd9a9cd47 (diff)
Initialize the field eccbytes in nand_oobinfo.
Required to specify eccbytes for current MTD version, otherwise ECC will fail. Thanks to Artis Kugevics.
Diffstat (limited to 'yaffs_mtdif.c')
-rw-r--r--yaffs_mtdif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/yaffs_mtdif.c b/yaffs_mtdif.c
index 4c87542..5d1777e 100644
--- a/yaffs_mtdif.c
+++ b/yaffs_mtdif.c
@@ -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}
};