summaryrefslogtreecommitdiffstats
path: root/include/linux/proc_fs.h
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2013-02-19 00:43:10 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-19 13:18:13 -0500
commit4fc1a601f147abe3bfb4d70fe718110ed21953e1 (patch)
tree7584eb8f9f4d2c3b2aefd751296bdc177fd11f6a /include/linux/proc_fs.h
parent629821d9b05254063df774594cfe15c0343b73f2 (diff)
downloadlinux-stable-4fc1a601f147abe3bfb4d70fe718110ed21953e1.tar.gz
linux-stable-4fc1a601f147abe3bfb4d70fe718110ed21953e1.tar.bz2
linux-stable-4fc1a601f147abe3bfb4d70fe718110ed21953e1.zip
net: proc: fix build failed when procfs is not configured
commit d4beaa66add8aebf83ab16d2fde4e4de8dac36df "net: proc: change proc_net_fops_create to proc_create" uses proc_create to replace proc_net_fops_create, when CONFIG_PROC isn't configured, some build error will occurs. net/packet/af_packet.c: In function 'packet_net_init': net/packet/af_packet.c:3831:48: error: 'packet_seq_fops' undeclared (first use in this function) net/packet/af_packet.c:3831:48: note: each undeclared identifier is reported only once for each function it appears in There may be other build fails like above,this patch change proc_create from function to macros when CONFIG_PROC is not configured,just like what proc_net_fops_create did before this commit. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r--include/linux/proc_fs.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 319f69422667..d0a1f2ca1c3f 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -187,12 +187,9 @@ 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)