[Yaffs] [YAFFS 06/10] Use MTD_OPS_AUTO_OOB instead MTD_OOB_A…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Waldemar Rymarkiewicz
Date:  
To: yaffs
CC: Waldemar Rymarkiewicz, manningc2
Old-Topics: [Yaffs] [YAFFS 00/10] Add support of v3.2 kernel in single flavour of yaffs
Subject: [Yaffs] [YAFFS 06/10] Use MTD_OPS_AUTO_OOB instead MTD_OOB_AUTO
It's due to changes in v3.2 kernel

Signed-off-by: Waldemar Rymarkiewicz <>
---
 yaffs_mtdif1_single.c |    4 ++--
 yaffs_mtdif2_single.c |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)


diff --git a/yaffs_mtdif1_single.c b/yaffs_mtdif1_single.c
index bfdd93a..a6907bf 100644
--- a/yaffs_mtdif1_single.c
+++ b/yaffs_mtdif1_single.c
@@ -97,7 +97,7 @@ int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
         }


     memset(&ops, 0, sizeof(ops));
-    ops.mode = MTD_OOB_AUTO;
+    ops.mode = MTD_OPS_AUTO_OOB;
     ops.len = (data) ? chunk_bytes : 0;
     ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
     ops.datbuf = (u8 *) data;
@@ -150,7 +150,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
     int deleted;


     memset(&ops, 0, sizeof(ops));
-    ops.mode = MTD_OOB_AUTO;
+    ops.mode = MTD_OPS_AUTO_OOB;
     ops.len = (data) ? chunk_bytes : 0;
     ops.ooblen =  dev->param.tags_9bytes ? 9 : 8;
     ops.datbuf = data;
diff --git a/yaffs_mtdif2_single.c b/yaffs_mtdif2_single.c
index c013232..f92c49f 100644
--- a/yaffs_mtdif2_single.c
+++ b/yaffs_mtdif2_single.c
@@ -21,6 +21,7 @@
 #include "linux/mtd/mtd.h"
 #include "linux/types.h"
 #include "linux/time.h"
+#include "mtd/mtd-abi.h"



 /* NB For use with inband tags....
@@ -64,7 +65,7 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
         yaffs_pack_tags2(&pt, tags, !dev->param.no_tags_ecc);
     }


-    ops.mode = MTD_OOB_AUTO;
+    ops.mode = MTD_OPS_AUTO_OOB;
     ops.ooblen = (dev->param.inband_tags) ? 0 : packed_tags_size;
     ops.len = dev->param.total_bytes_per_chunk;
     ops.ooboffs = 0;
@@ -106,7 +107,7 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
         retval = mtd->read(mtd, addr, dev->param.total_bytes_per_chunk,
                    &dummy, data);
     } else if (tags) {
-        ops.mode = MTD_OOB_AUTO;
+        ops.mode = MTD_OPS_AUTO_OOB;
         ops.ooblen = packed_tags_size;
         ops.len = data ? dev->data_bytes_per_chunk : packed_tags_size;
         ops.ooboffs = 0;
-- 
1.7.8