mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] proc_mkdir() should be used to create procfs directories
A bunch of create_proc_dir_entry() calls creating directories had crept in since the last sweep; converted to proc_mkdir(). Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ecba97d4aa
commit
666002218d
15 changed files with 31 additions and 45 deletions
|
|
@ -99,7 +99,7 @@ static irqreturn_t ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs
|
|||
static inline void ibmveth_schedule_replenishing(struct ibmveth_adapter*);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#define IBMVETH_PROC_DIR "ibmveth"
|
||||
#define IBMVETH_PROC_DIR "net/ibmveth"
|
||||
static struct proc_dir_entry *ibmveth_proc_dir;
|
||||
#endif
|
||||
|
||||
|
|
@ -1010,7 +1010,7 @@ static int __devexit ibmveth_remove(struct vio_dev *dev)
|
|||
#ifdef CONFIG_PROC_FS
|
||||
static void ibmveth_proc_register_driver(void)
|
||||
{
|
||||
ibmveth_proc_dir = create_proc_entry(IBMVETH_PROC_DIR, S_IFDIR, proc_net);
|
||||
ibmveth_proc_dir = proc_mkdir(IBMVETH_PROC_DIR, NULL);
|
||||
if (ibmveth_proc_dir) {
|
||||
SET_MODULE_OWNER(ibmveth_proc_dir);
|
||||
}
|
||||
|
|
@ -1018,7 +1018,7 @@ static void ibmveth_proc_register_driver(void)
|
|||
|
||||
static void ibmveth_proc_unregister_driver(void)
|
||||
{
|
||||
remove_proc_entry(IBMVETH_PROC_DIR, proc_net);
|
||||
remove_proc_entry(IBMVETH_PROC_DIR, NULL);
|
||||
}
|
||||
|
||||
static void *ibmveth_seq_start(struct seq_file *seq, loff_t *pos)
|
||||
|
|
|
|||
|
|
@ -1875,11 +1875,11 @@ static int __init vlsi_mod_init(void)
|
|||
|
||||
sirpulse = !!sirpulse;
|
||||
|
||||
/* create_proc_entry returns NULL if !CONFIG_PROC_FS.
|
||||
/* proc_mkdir returns NULL if !CONFIG_PROC_FS.
|
||||
* Failure to create the procfs entry is handled like running
|
||||
* without procfs - it's not required for the driver to work.
|
||||
*/
|
||||
vlsi_proc_root = create_proc_entry(PROC_DIR, S_IFDIR, NULL);
|
||||
vlsi_proc_root = proc_mkdir(PROC_DIR, NULL);
|
||||
if (vlsi_proc_root) {
|
||||
/* protect registered procdir against module removal.
|
||||
* Because we are in the module init path there's no race
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ static int __init pppoe_proc_init(void)
|
|||
{
|
||||
struct proc_dir_entry *p;
|
||||
|
||||
p = create_proc_entry("pppoe", S_IRUGO, proc_net);
|
||||
p = create_proc_entry("net/pppoe", S_IRUGO, NULL);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -1142,7 +1142,7 @@ static void __exit pppoe_exit(void)
|
|||
dev_remove_pack(&pppoes_ptype);
|
||||
dev_remove_pack(&pppoed_ptype);
|
||||
unregister_netdevice_notifier(&pppoe_notifier);
|
||||
remove_proc_entry("pppoe", proc_net);
|
||||
remove_proc_entry("net/pppoe", NULL);
|
||||
proto_unregister(&pppoe_sk_proto);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ static int SkDrvDeInitAdapter(SK_AC *pAC, int devNbr);
|
|||
* Extern Function Prototypes
|
||||
*
|
||||
******************************************************************************/
|
||||
static const char SKRootName[] = "sk98lin";
|
||||
static const char SKRootName[] = "net/sk98lin";
|
||||
static struct proc_dir_entry *pSkRootDir;
|
||||
extern struct file_operations sk_proc_fops;
|
||||
|
||||
|
|
@ -5242,20 +5242,20 @@ static int __init skge_init(void)
|
|||
{
|
||||
int error;
|
||||
|
||||
pSkRootDir = proc_mkdir(SKRootName, proc_net);
|
||||
pSkRootDir = proc_mkdir(SKRootName, NULL);
|
||||
if (pSkRootDir)
|
||||
pSkRootDir->owner = THIS_MODULE;
|
||||
|
||||
error = pci_register_driver(&skge_driver);
|
||||
if (error)
|
||||
proc_net_remove(SKRootName);
|
||||
remove_proc_entry(SKRootName, NULL);
|
||||
return error;
|
||||
}
|
||||
|
||||
static void __exit skge_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&skge_driver);
|
||||
proc_net_remove(SKRootName);
|
||||
remove_proc_entry(SKRootName, NULL);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue