Skip to contentSkip to conversation

proc: switch to proc_create()

PATCH New Alexey Dobriyan 1 participant 1 message Feb 26, 2008 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: switch to proc_create()

---

 fs/proc/internal.h  |    2 -
 fs/proc/nommu.c     |    2 -
 fs/proc/proc_misc.c |   66 +++++++++++++++++-----------------------------------
 fs/proc/proc_tty.c  |    5 ---
 4 files changed, 24 insertions(+), 51 deletions(-)
fs/proc/internal.h +0 -2
@@ -46,8 +46,6 @@ extern int nommu_vma_show(struct seq_file *, struct vm_area_struct *);
 
 extern int maps_protect;
 
-extern void create_seq_entry(char *name, mode_t mode,
-				const struct file_operations *f);
 extern int proc_exe_link(struct inode *, struct path *);
 extern int proc_tid_stat(struct seq_file *m, struct pid_namespace *ns,
 				struct pid *pid, struct task_struct *task);
fs/proc/nommu.c +1 -1
@@ -137,7 +137,7 @@ static const struct file_operations proc_nommu_vma_list_operations = {
 
 static int __init proc_nommu_init(void)
 {
-	create_seq_entry("maps", S_IRUGO, &proc_nommu_vma_list_operations);
+	proc_create("maps", S_IRUGO, NULL, &proc_nommu_vma_list_operations);
 	return 0;
 }
 
fs/proc/proc_misc.c +22 -44

99 lines not on this page · raw message

fs/proc/proc_tty.c +1 -4
@@ -214,7 +214,6 @@ void proc_tty_unregister_driver(struct tty_driver *driver)
  */
 void __init proc_tty_init(void)
 {
-	struct proc_dir_entry *entry;
 	if (!proc_mkdir("tty", NULL))
 		return;
 	proc_tty_ldisc = proc_mkdir("tty/ldisc", NULL);
@@ -227,7 +226,5 @@ void __init proc_tty_init(void)
 	proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, NULL);
 
 	create_proc_read_entry("tty/ldiscs", 0, NULL, tty_ldiscs_read_proc, NULL);
-	entry = create_proc_entry("tty/drivers", 0, NULL);
-	if (entry)
-		entry->proc_fops = &proc_tty_drivers_operations;
+	proc_create("tty/drivers", 0, NULL, &proc_tty_drivers_operations);
 }