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>
This commit is contained in:
parent
36a5aeb878
commit
928b4d8c89
6 changed files with 11 additions and 17 deletions
|
@ -425,7 +425,7 @@ static void __devinit cciss_procinit(int i)
|
||||||
struct proc_dir_entry *pde;
|
struct proc_dir_entry *pde;
|
||||||
|
|
||||||
if (proc_cciss == NULL)
|
if (proc_cciss == NULL)
|
||||||
proc_cciss = proc_mkdir("cciss", proc_root_driver);
|
proc_cciss = proc_mkdir("driver/cciss", NULL);
|
||||||
if (!proc_cciss)
|
if (!proc_cciss)
|
||||||
return;
|
return;
|
||||||
pde = proc_create(hba[i]->devname, S_IWUSR | S_IRUSR | S_IRGRP |
|
pde = proc_create(hba[i]->devname, S_IWUSR | S_IRUSR | S_IRGRP |
|
||||||
|
@ -3700,7 +3700,7 @@ static void __exit cciss_cleanup(void)
|
||||||
cciss_remove_one(hba[i]->pdev);
|
cciss_remove_one(hba[i]->pdev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
remove_proc_entry("cciss", proc_root_driver);
|
remove_proc_entry("driver/cciss", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fail_all_cmds(unsigned long ctlr)
|
static void fail_all_cmds(unsigned long ctlr)
|
||||||
|
|
|
@ -214,7 +214,7 @@ static struct proc_dir_entry *proc_array;
|
||||||
static void __init ida_procinit(int i)
|
static void __init ida_procinit(int i)
|
||||||
{
|
{
|
||||||
if (proc_array == NULL) {
|
if (proc_array == NULL) {
|
||||||
proc_array = proc_mkdir("cpqarray", proc_root_driver);
|
proc_array = proc_mkdir("driver/cpqarray", NULL);
|
||||||
if (!proc_array) return;
|
if (!proc_array) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1796,7 +1796,7 @@ static void __exit cpqarray_exit(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_proc_entry("cpqarray", proc_root_driver);
|
remove_proc_entry("driver/cpqarray", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(cpqarray_init)
|
module_init(cpqarray_init)
|
||||||
|
|
|
@ -3101,7 +3101,7 @@ static int __init pkt_init(void)
|
||||||
goto out_misc;
|
goto out_misc;
|
||||||
}
|
}
|
||||||
|
|
||||||
pkt_proc = proc_mkdir(DRIVER_NAME, proc_root_driver);
|
pkt_proc = proc_mkdir("driver/"DRIVER_NAME, NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -3117,7 +3117,7 @@ static int __init pkt_init(void)
|
||||||
|
|
||||||
static void __exit pkt_exit(void)
|
static void __exit pkt_exit(void)
|
||||||
{
|
{
|
||||||
remove_proc_entry(DRIVER_NAME, proc_root_driver);
|
remove_proc_entry("driver/"DRIVER_NAME, NULL);
|
||||||
misc_deregister(&pkt_misc);
|
misc_deregister(&pkt_misc);
|
||||||
|
|
||||||
pkt_debugfs_cleanup();
|
pkt_debugfs_cleanup();
|
||||||
|
|
|
@ -5625,9 +5625,9 @@ static int __init airo_init_module( void )
|
||||||
int have_isa_dev = 0;
|
int have_isa_dev = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
airo_entry = create_proc_entry("aironet",
|
airo_entry = create_proc_entry("driver/aironet",
|
||||||
S_IFDIR | airo_perm,
|
S_IFDIR | airo_perm,
|
||||||
proc_root_driver);
|
NULL);
|
||||||
|
|
||||||
if (airo_entry) {
|
if (airo_entry) {
|
||||||
airo_entry->uid = proc_uid;
|
airo_entry->uid = proc_uid;
|
||||||
|
@ -5651,7 +5651,7 @@ static int __init airo_init_module( void )
|
||||||
airo_print_info("", "Finished probing for PCI adapters");
|
airo_print_info("", "Finished probing for PCI adapters");
|
||||||
|
|
||||||
if (i) {
|
if (i) {
|
||||||
remove_proc_entry("aironet", proc_root_driver);
|
remove_proc_entry("driver/aironet", NULL);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -5673,7 +5673,7 @@ static void __exit airo_cleanup_module( void )
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
pci_unregister_driver(&airo_driver);
|
pci_unregister_driver(&airo_driver);
|
||||||
#endif
|
#endif
|
||||||
remove_proc_entry("aironet", proc_root_driver);
|
remove_proc_entry("driver/aironet", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
struct proc_dir_entry *proc_root_driver;
|
|
||||||
|
|
||||||
static int proc_test_super(struct super_block *sb, void *data)
|
static int proc_test_super(struct super_block *sb, void *data)
|
||||||
{
|
{
|
||||||
return sb->s_fs_info == data;
|
return sb->s_fs_info == data;
|
||||||
|
@ -127,7 +125,7 @@ void __init proc_root_init(void)
|
||||||
proc_mkdir("sysvipc", NULL);
|
proc_mkdir("sysvipc", NULL);
|
||||||
#endif
|
#endif
|
||||||
proc_mkdir("fs", NULL);
|
proc_mkdir("fs", NULL);
|
||||||
proc_root_driver = proc_mkdir("driver", NULL);
|
proc_mkdir("driver", NULL);
|
||||||
proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
|
proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
|
||||||
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
|
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
|
||||||
/* just give it a mountpoint */
|
/* just give it a mountpoint */
|
||||||
|
@ -235,4 +233,3 @@ EXPORT_SYMBOL(create_proc_entry);
|
||||||
EXPORT_SYMBOL(proc_create);
|
EXPORT_SYMBOL(proc_create);
|
||||||
EXPORT_SYMBOL(remove_proc_entry);
|
EXPORT_SYMBOL(remove_proc_entry);
|
||||||
EXPORT_SYMBOL(proc_root);
|
EXPORT_SYMBOL(proc_root);
|
||||||
EXPORT_SYMBOL(proc_root_driver);
|
|
||||||
|
|
|
@ -97,7 +97,6 @@ struct vmcore {
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
|
|
||||||
extern struct proc_dir_entry proc_root;
|
extern struct proc_dir_entry proc_root;
|
||||||
extern struct proc_dir_entry *proc_root_driver;
|
|
||||||
extern struct proc_dir_entry *proc_root_kcore;
|
extern struct proc_dir_entry *proc_root_kcore;
|
||||||
|
|
||||||
extern spinlock_t proc_subdir_lock;
|
extern spinlock_t proc_subdir_lock;
|
||||||
|
@ -211,8 +210,6 @@ extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define proc_root_driver NULL
|
|
||||||
|
|
||||||
#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
|
#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
|
||||||
static inline void proc_net_remove(struct net *net, const char *name) {}
|
static inline void proc_net_remove(struct net *net, const char *name) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue