X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_mtdif1_multi.c;h=14d5c6f0d3579b5c6e82c12878253fe0b762da16;hp=3673891c3b4450f1f5dc5d9d37deafddcf579203;hb=80d031a7c6cbfc952e9646c5cc3c838ddb4d073f;hpb=79fcd0f8cc347e650e8ccdce12d7a350b8cc6008 diff --git a/yaffs_mtdif1_multi.c b/yaffs_mtdif1_multi.c index 3673891..14d5c6f 100644 --- a/yaffs_mtdif1_multi.c +++ b/yaffs_mtdif1_multi.c @@ -36,6 +36,11 @@ #include "linux/types.h" #include "linux/mtd/mtd.h" +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)) +#define MTD_OPS_AUTO_OOB MTD_OOB_AUTO +#endif + + /* Don't compile this module if we don't have MTD's mtd_oob_ops interface */ #if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17)) @@ -124,7 +129,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; @@ -177,7 +182,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;