generic/3.10: rename mtd patches
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.10 / 515-yaffs-3.10-disable-proc-entry.patch
1 --- a/fs/yaffs2/yaffs_vfs_glue.c
2 +++ b/fs/yaffs2/yaffs_vfs_glue.c
3 @@ -3385,6 +3385,7 @@ static DECLARE_FSTYPE(yaffs2_fs_type, "y
4
5 #endif /* CONFIG_YAFFS_YAFFS2 */
6
7 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0))
8 static struct proc_dir_entry *my_proc_entry;
9 static struct proc_dir_entry *debug_proc_entry;
10
11 @@ -3668,6 +3669,7 @@ static int yaffs_proc_write(struct file
12 {
13 return yaffs_proc_write_trace_options(file, buf, count, data);
14 }
15 +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)) */
16
17 /* Stuff to handle installation of file systems */
18 struct file_system_to_install {
19 @@ -3699,6 +3701,7 @@ static int __init init_yaffs_fs(void)
20
21 mutex_init(&yaffs_context_lock);
22
23 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0))
24 /* Install the proc_fs entries */
25 my_proc_entry = create_proc_entry("yaffs",
26 S_IRUGO | S_IFREG,
27 @@ -3721,6 +3724,7 @@ static int __init init_yaffs_fs(void)
28 debug_proc_entry->data = NULL;
29 } else
30 return -ENOMEM;
31 +#endif
32
33 /* Now add the file system entries */
34
35 @@ -3757,8 +3761,10 @@ static void __exit exit_yaffs_fs(void)
36 T(YAFFS_TRACE_ALWAYS,
37 (TSTR("yaffs built " __DATE__ " " __TIME__ " removing. \n")));
38
39 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0))
40 remove_proc_entry("yaffs", YPROC_ROOT);
41 remove_proc_entry("yaffs_stats", YPROC_ROOT);
42 +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)) */
43
44 fsinst = fs_to_install;
45