X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_mtdif2_multi.c;h=18ac9921985ee7a3ffef684d4698cd2e54ae921d;hp=684ed2a956dac805ccce39e69d8af7102522a972;hb=c83e416cba6748e7a436c5df6a202349ff4d0fe2;hpb=d7388fb75a13610d14d0afc397f826bd44c972e1 diff --git a/yaffs_mtdif2_multi.c b/yaffs_mtdif2_multi.c index 684ed2a..18ac992 100644 --- a/yaffs_mtdif2_multi.c +++ b/yaffs_mtdif2_multi.c @@ -26,6 +26,12 @@ #include "yaffs_linux.h" +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)) +#define MTD_OPS_AUTO_OOB MTD_OOB_AUTO +#endif + + + /* NB For use with inband tags.... * We assume that the data buffer is of size total_bytes_per_chunk so * that we can also use it to load the tags. @@ -75,7 +81,7 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk, } #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17)) - 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; @@ -139,7 +145,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;