aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-04-29 04:01:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:18 -0400
commit928b4d8c8963e75bdb133f562b03b07f9aa4844a (patch)
tree18de7e85fe403f681a954ed04254b2d9085e7fe4
parent36a5aeb8787fbf92510ed20d806e229c55726f93 (diff)
proc: remove proc_root_driver
Use creation by full path: "driver/foo". Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/block/cciss.c4
-rw-r--r--drivers/block/cpqarray.c4
-rw-r--r--drivers/block/pktcdvd.c4
-rw-r--r--drivers/net/wireless/airo.c8
-rw-r--r--fs/proc/root.c5
-rw-r--r--include/linux/proc_fs.h3
6 files changed, 11 insertions, 17 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index cf6083a1f928..e539be5750dc 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -425,7 +425,7 @@ static void __devinit cciss_procinit(int i)
425 struct proc_dir_entry *pde; 425 struct proc_dir_entry *pde;
426 426
427 if (proc_cciss == NULL) 427 if (proc_cciss == NULL)
428 proc_cciss = proc_mkdir("cciss", proc_root_driver); 428 proc_cciss = proc_mkdir("driver/cciss", NULL);
429 if (!proc_cciss) 429 if (!proc_cciss)
430 return; 430 return;
431 pde = proc_create(hba[i]->devname, S_IWUSR | S_IRUSR | S_IRGRP | 431 pde = proc_create(hba[i]->devname, S_IWUSR | S_IRUSR | S_IRGRP |
@@ -3700,7 +3700,7 @@ static void __exit cciss_cleanup(void)
3700 cciss_remove_one(hba[i]->pdev); 3700 cciss_remove_one(hba[i]->pdev);
3701 } 3701 }
3702 } 3702 }
3703 remove_proc_entry("cciss", proc_root_driver); 3703 remove_proc_entry("driver/cciss", NULL);
3704} 3704}
3705 3705
3706static void fail_all_cmds(unsigned long ctlr) 3706static void fail_all_cmds(unsigned long ctlr)
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 69199185ff4b..09c14341e6e3 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -214,7 +214,7 @@ static struct proc_dir_entry *proc_array;
214static void __init ida_procinit(int i) 214static void __init ida_procinit(int i)
215{ 215{
216 if (proc_array == NULL) { 216 if (proc_array == NULL) {
217 proc_array = proc_mkdir("cpqarray", proc_root_driver); 217 proc_array = proc_mkdir("driver/cpqarray", NULL);
218 if (!proc_array) return; 218 if (!proc_array) return;
219 } 219 }
220 220
@@ -1796,7 +1796,7 @@ static void __exit cpqarray_exit(void)
1796 } 1796 }
1797 } 1797 }
1798 1798
1799 remove_proc_entry("cpqarray", proc_root_driver); 1799 remove_proc_entry("driver/cpqarray", NULL);
1800} 1800}
1801 1801
1802module_init(cpqarray_init) 1802module_init(cpqarray_init)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 18feb1c7c33b..0431e5977bcb 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -3101,7 +3101,7 @@ static int __init pkt_init(void)
3101 goto out_misc; 3101 goto out_misc;
3102 } 3102 }
3103 3103
3104 pkt_proc = proc_mkdir(DRIVER_NAME, proc_root_driver); 3104 pkt_proc = proc_mkdir("driver/"DRIVER_NAME, NULL);
3105 3105
3106 return 0; 3106 return 0;
3107 3107
@@ -3117,7 +3117,7 @@ out2:
3117 3117
3118static void __exit pkt_exit(void) 3118static void __exit pkt_exit(void)
3119{ 3119{
3120 remove_proc_entry(DRIVER_NAME, proc_root_driver); 3120 remove_proc_entry("driver/"DRIVER_NAME, NULL);
3121 misc_deregister(&pkt_misc); 3121 misc_deregister(&pkt_misc);
3122 3122
3123 pkt_debugfs_cleanup(); 3123 pkt_debugfs_cleanup();
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 932d6b1c9d0b..6c395fcece58 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5625,9 +5625,9 @@ static int __init airo_init_module( void )
5625 int have_isa_dev = 0; 5625 int have_isa_dev = 0;
5626#endif 5626#endif
5627 5627
5628 airo_entry = create_proc_entry("aironet", 5628 airo_entry = create_proc_entry("driver/aironet",
5629 S_IFDIR | airo_perm, 5629 S_IFDIR | airo_perm,
5630 proc_root_driver); 5630 NULL);
5631 5631
5632 if (airo_entry) { 5632 if (airo_entry) {
5633 airo_entry->uid = proc_uid; 5633 airo_entry->uid = proc_uid;
@@ -5651,7 +5651,7 @@ static int __init airo_init_module( void )
5651 airo_print_info("", "Finished probing for PCI adapters"); 5651 airo_print_info("", "Finished probing for PCI adapters");
5652 5652
5653 if (i) { 5653 if (i) {
5654 remove_proc_entry("aironet", proc_root_driver); 5654 remove_proc_entry("driver/aironet", NULL);
5655 return i; 5655 return i;
5656 } 5656 }
5657#endif 5657#endif
@@ -5673,7 +5673,7 @@ static void __exit airo_cleanup_module( void )
5673#ifdef CONFIG_PCI 5673#ifdef CONFIG_PCI
5674 pci_unregister_driver(&airo_driver); 5674 pci_unregister_driver(&airo_driver);
5675#endif 5675#endif
5676 remove_proc_entry("aironet", proc_root_driver); 5676 remove_proc_entry("driver/aironet", NULL);
5677} 5677}
5678 5678
5679/* 5679/*
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 596abb690afa..5e93e9b0124e 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -22,8 +22,6 @@
22 22
23#include "internal.h" 23#include "internal.h"
24 24
25struct proc_dir_entry *proc_root_driver;
26
27static int proc_test_super(struct super_block *sb, void *data) 25static int proc_test_super(struct super_block *sb, void *data)
28{ 26{
29 return sb->s_fs_info == data; 27 return sb->s_fs_info == data;
@@ -127,7 +125,7 @@ void __init proc_root_init(void)
127 proc_mkdir("sysvipc", NULL); 125 proc_mkdir("sysvipc", NULL);
128#endif 126#endif
129 proc_mkdir("fs", NULL); 127 proc_mkdir("fs", NULL);
130 proc_root_driver = proc_mkdir("driver", NULL); 128 proc_mkdir("driver", NULL);
131 proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */ 129 proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
132#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE) 130#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
133 /* just give it a mountpoint */ 131 /* just give it a mountpoint */
@@ -235,4 +233,3 @@ EXPORT_SYMBOL(create_proc_entry);
235EXPORT_SYMBOL(proc_create); 233EXPORT_SYMBOL(proc_create);
236EXPORT_SYMBOL(remove_proc_entry); 234EXPORT_SYMBOL(remove_proc_entry);
237EXPORT_SYMBOL(proc_root); 235EXPORT_SYMBOL(proc_root);
238EXPORT_SYMBOL(proc_root_driver);
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 65582f0384e0..f56205cbebc0 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -97,7 +97,6 @@ struct vmcore {
97#ifdef CONFIG_PROC_FS 97#ifdef CONFIG_PROC_FS
98 98
99extern struct proc_dir_entry proc_root; 99extern struct proc_dir_entry proc_root;
100extern struct proc_dir_entry *proc_root_driver;
101extern struct proc_dir_entry *proc_root_kcore; 100extern struct proc_dir_entry *proc_root_kcore;
102 101
103extern spinlock_t proc_subdir_lock; 102extern spinlock_t proc_subdir_lock;
@@ -211,8 +210,6 @@ extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm);
211 210
212#else 211#else
213 212
214#define proc_root_driver NULL
215
216#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) 213#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
217static inline void proc_net_remove(struct net *net, const char *name) {} 214static inline void proc_net_remove(struct net *net, const char *name) {}
218 215