diff options
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r-- | include/linux/proc_fs.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 32676b35d2f..8307f2f94d8 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -127,7 +127,12 @@ extern void pid_ns_release_proc(struct pid_namespace *ns); * proc_tty.c */ struct tty_driver; +#ifdef CONFIG_TTY extern void proc_tty_init(void); +#else +static inline void proc_tty_init(void) +{ } +#endif extern void proc_tty_register_driver(struct tty_driver *driver); extern void proc_tty_unregister_driver(struct tty_driver *driver); @@ -171,9 +176,6 @@ static inline struct proc_dir_entry *create_proc_read_entry(const char *name, return res; } -extern struct proc_dir_entry *proc_net_fops_create(struct net *net, - const char *name, umode_t mode, const struct file_operations *fops); -extern void proc_net_remove(struct net *net, const char *name); extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, struct proc_dir_entry *parent); @@ -184,21 +186,15 @@ extern int proc_alloc_inum(unsigned int *pino); extern void proc_free_inum(unsigned int inum); #else -#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_flush_task(struct task_struct *task) { } static inline struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, struct proc_dir_entry *parent) { return NULL; } -static inline struct proc_dir_entry *proc_create(const char *name, - umode_t mode, struct proc_dir_entry *parent, - const struct file_operations *proc_fops) -{ - return NULL; -} + +#define proc_create(name, mode, parent, fops) ({ (void)(mode), NULL; }) + static inline struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct file_operations *proc_fops, void *data) |