[kernel] refresh 2.6.28 patches
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.28 / 513-yaffs_2.6.26_fix.patch
1 --- a/fs/yaffs2/yaffs_fs.c
2 +++ b/fs/yaffs2/yaffs_fs.c
3 @@ -76,6 +76,12 @@ extern const char *yaffs_guts_c_version;
4
5 #endif
6
7 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
8 +#define YPROC_ROOT &proc_root
9 +#else
10 +#define YPROC_ROOT NULL
11 +#endif
12 +
13 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
14 #define WRITE_SIZE_STR "writesize"
15 #define WRITE_SIZE(mtd) (mtd)->writesize
16 @@ -189,7 +195,9 @@ static void yaffs_read_inode(struct inod
17 #endif
18
19
20 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
21 static void yaffs_put_inode(struct inode *inode);
22 +#endif
23 static void yaffs_delete_inode(struct inode *);
24 static void yaffs_clear_inode(struct inode *);
25
26 @@ -293,7 +301,9 @@ static struct super_operations yaffs_sup
27 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
28 .read_inode = yaffs_read_inode,
29 #endif
30 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
31 .put_inode = yaffs_put_inode,
32 +#endif
33 .put_super = yaffs_put_super,
34 .delete_inode = yaffs_delete_inode,
35 .clear_inode = yaffs_clear_inode,
36 @@ -437,6 +447,7 @@ static struct dentry *yaffs_lookup(struc
37
38 }
39
40 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
41 /* For now put inode is just for debugging
42 * Put inode is called when the inode **structure** is put.
43 */
44 @@ -447,6 +458,7 @@ static void yaffs_put_inode(struct inode
45 atomic_read(&inode->i_count)));
46
47 }
48 +#endif
49
50 /* clear is called to tell the fs to release any per-inode data it holds */
51 static void yaffs_clear_inode(struct inode *inode)
52 @@ -2279,7 +2291,7 @@ static int __init init_yaffs_fs(void)
53 /* Install the proc_fs entry */
54 my_proc_entry = create_proc_entry("yaffs",
55 S_IRUGO | S_IFREG,
56 - &proc_root);
57 + YPROC_ROOT);
58
59 if (my_proc_entry) {
60 my_proc_entry->write_proc = yaffs_proc_write;
61 @@ -2325,7 +2337,7 @@ static void __exit exit_yaffs_fs(void)
62 T(YAFFS_TRACE_ALWAYS, ("yaffs " __DATE__ " " __TIME__
63 " removing. \n"));
64
65 - remove_proc_entry("yaffs", &proc_root);
66 + remove_proc_entry("yaffs", YPROC_ROOT);
67
68 fsinst = fs_to_install;
69
This page took 0.073488 seconds and 5 git commands to generate.