kernel/3.9: remove yaffs patches
[openwrt/staging/yousong.git] / target / linux / generic / patches-3.8 / 505-yaffs-3.2-use-MTD_OPS_AUTO_OOB.patch
1 --- a/fs/yaffs2/yaffs_mtdif1.c
2 +++ b/fs/yaffs2/yaffs_mtdif1.c
3 @@ -127,7 +127,7 @@ int nandmtd1_WriteChunkWithTagsToNAND(ya
4 #endif
5
6 memset(&ops, 0, sizeof(ops));
7 - ops.mode = MTD_OOB_AUTO;
8 + ops.mode = MTD_OPS_AUTO_OOB;
9 ops.len = (data) ? chunkBytes : 0;
10 ops.ooblen = YTAG1_SIZE;
11 ops.datbuf = (__u8 *)data;
12 @@ -179,7 +179,7 @@ int nandmtd1_ReadChunkWithTagsFromNAND(y
13 int deleted;
14
15 memset(&ops, 0, sizeof(ops));
16 - ops.mode = MTD_OOB_AUTO;
17 + ops.mode = MTD_OPS_AUTO_OOB;
18 ops.len = (data) ? chunkBytes : 0;
19 ops.ooblen = YTAG1_SIZE;
20 ops.datbuf = data;
21 --- a/fs/yaffs2/yaffs_mtdif2.c
22 +++ b/fs/yaffs2/yaffs_mtdif2.c
23 @@ -71,7 +71,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(ya
24 yaffs_PackTags2(&pt, tags, !dev->param.no_tags_ecc);
25
26 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
27 - ops.mode = MTD_OOB_AUTO;
28 + ops.mode = MTD_OPS_AUTO_OOB;
29 ops.ooblen = (dev->param.inband_tags) ? 0 : packed_tags_size;
30 ops.len = dev->param.total_bytes_per_chunk;
31 ops.ooboffs = 0;
32 @@ -136,7 +136,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(y
33 retval = mtd->read(mtd, addr, dev->param.total_bytes_per_chunk,
34 &dummy, data);
35 else if (tags) {
36 - ops.mode = MTD_OOB_AUTO;
37 + ops.mode = MTD_OPS_AUTO_OOB;
38 ops.ooblen = packed_tags_size;
39 ops.len = data ? dev->data_bytes_per_chunk : packed_tags_size;
40 ops.ooboffs = 0;
41 --- a/fs/yaffs2/yaffs_mtdif.h
42 +++ b/fs/yaffs2/yaffs_mtdif.h
43 @@ -24,4 +24,11 @@ extern struct nand_oobinfo yaffs_noeccin
44 #endif
45 int nandmtd_EraseBlockInNAND(yaffs_dev_t *dev, int blockNumber);
46 int nandmtd_InitialiseNAND(yaffs_dev_t *dev);
47 +
48 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0))
49 +#include <mtd/mtd-abi.h>
50 +#else
51 +#define MTD_OPS_AUTO_OOB MTD_OOB_AUTO
52 +#endif
53 +
54 #endif