502-yaffs-3.10-disable-proc-entry.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --- a/fs/yaffs2/yaffs_vfs.c
  2. +++ b/fs/yaffs2/yaffs_vfs.c
  3. @@ -3025,6 +3025,7 @@ static DECLARE_FSTYPE(yaffs2_fs_type, "y
  4. #endif
  5. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0))
  6. static struct proc_dir_entry *my_proc_entry;
  7. static char *yaffs_dump_dev_part0(char *buf, struct yaffs_dev *dev)
  8. @@ -3398,6 +3399,7 @@ static int yaffs_proc_write(struct file
  9. return yaffs_proc_debug_write(file, buf, count, data);
  10. return yaffs_proc_write_trace_options(file, buf, count, data);
  11. }
  12. +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)) */
  13. /* Stuff to handle installation of file systems */
  14. struct file_system_to_install {
  15. @@ -3421,6 +3423,7 @@ static int __init init_yaffs_fs(void)
  16. mutex_init(&yaffs_context_lock);
  17. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0))
  18. /* Install the proc_fs entries */
  19. my_proc_entry = create_proc_entry("yaffs",
  20. S_IRUGO | S_IFREG, YPROC_ROOT);
  21. @@ -3432,6 +3435,7 @@ static int __init init_yaffs_fs(void)
  22. } else {
  23. return -ENOMEM;
  24. }
  25. +#endif
  26. /* Now add the file system entries */
  27. @@ -3468,7 +3472,9 @@ static void __exit exit_yaffs_fs(void)
  28. yaffs_trace(YAFFS_TRACE_ALWAYS,
  29. "yaffs built " __DATE__ " " __TIME__ " removing.");
  30. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0))
  31. remove_proc_entry("yaffs", YPROC_ROOT);
  32. +#endif
  33. fsinst = fs_to_install;