}
EXPORT_SYMBOL(proc_mkdir);
-struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode,
- struct proc_dir_entry *parent)
+struct proc_dir_entry *create_proc_read_entry(
+ const char *name, umode_t mode, struct proc_dir_entry *parent,
+ read_proc_t *read_proc, void *data)
{
struct proc_dir_entry *ent;
ent = __proc_create(&parent, name, mode, 1);
if (ent) {
+ ent->read_proc = read_proc;
+ ent->data = data;
if (proc_register(parent, ent) < 0) {
kfree(ent);
ent = NULL;
}
return ent;
}
-EXPORT_SYMBOL(create_proc_entry);
+EXPORT_SYMBOL(create_proc_read_entry);
struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
struct proc_dir_entry *parent,
void proc_flush_task(struct task_struct *task);
-extern struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode,
- struct proc_dir_entry *parent);
struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
struct proc_dir_entry *parent,
const struct file_operations *proc_fops,
return proc_create_data(name, mode, parent, proc_fops, NULL);
}
-static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
+extern struct proc_dir_entry *create_proc_read_entry(const char *name,
umode_t mode, struct proc_dir_entry *base,
- read_proc_t *read_proc, void * data)
-{
- struct proc_dir_entry *res=create_proc_entry(name,mode,base);
- if (res) {
- res->read_proc=read_proc;
- res->data=data;
- }
- return res;
-}
+ read_proc_t *read_proc, void *data);
extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
struct proc_dir_entry *parent);
{
}
-static inline struct proc_dir_entry *create_proc_entry(const char *name,
- umode_t mode, struct proc_dir_entry *parent) { return NULL; }
-
#define proc_create(name, mode, parent, fops) ({ (void)(mode), NULL; })
static inline struct proc_dir_entry *proc_create_data(const char *name,