summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/8021q/Makefile7
-rw-r--r--net/8021q/vlanproc.c31
-rw-r--r--net/8021q/vlanproc.h10
3 files changed, 16 insertions, 32 deletions
diff --git a/net/8021q/Makefile b/net/8021q/Makefile
index c816167992bb..97feb44dbdce 100644
--- a/net/8021q/Makefile
+++ b/net/8021q/Makefile
@@ -4,4 +4,9 @@
obj-$(CONFIG_VLAN_8021Q) += 8021q.o
-8021q-objs := vlan.o vlanproc.o vlan_dev.o
+8021q-objs := vlan.o vlan_dev.o
+
+ifeq ($(CONFIG_PROC_FS),y)
+8021q-objs += vlanproc.o
+endif
+
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index b8e70418ce5f..127b5dda97b5 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -38,8 +38,6 @@
/****** Function Prototypes *************************************************/
-#ifdef CONFIG_PROC_FS
-
/* Proc filesystem interface */
static ssize_t vlan_proc_read(struct file *file, char *buf, size_t count,
loff_t *ppos);
@@ -438,32 +436,3 @@ static int vlandev_get_info(char *buf, char **start,
return cnt;
}
-
-#else /* No CONFIG_PROC_FS */
-
-/*
- * No /proc - output stubs
- */
-
-int __init vlan_proc_init (void)
-{
- return 0;
-}
-
-void vlan_proc_cleanup(void)
-{
- return;
-}
-
-
-int vlan_proc_add_dev(struct net_device *vlandev)
-{
- return 0;
-}
-
-int vlan_proc_rem_dev(struct net_device *vlandev)
-{
- return 0;
-}
-
-#endif /* No CONFIG_PROC_FS */
diff --git a/net/8021q/vlanproc.h b/net/8021q/vlanproc.h
index ac1d67e6c397..badccbf97ac0 100644
--- a/net/8021q/vlanproc.h
+++ b/net/8021q/vlanproc.h
@@ -1,6 +1,7 @@
#ifndef __BEN_VLAN_PROC_INC__
#define __BEN_VLAN_PROC_INC__
+#ifdef CONFIG_PROC_FS
int vlan_proc_init(void);
int vlan_proc_rem_dev(struct net_device *vlandev);
@@ -9,4 +10,13 @@ void vlan_proc_cleanup (void);
#define VLAN_PROC_BUFSZ (4096) /* buffer size for printing proc info */
+#else /* No CONFIG_PROC_FS */
+
+#define vlan_proc_init() (0)
+#define vlan_proc_cleanup() do {} while(0)
+#define vlan_proc_add_dev(dev) ((void)(dev), 0)
+#define vlan_proc_rem_dev(dev) ((void)(dev), 0)
+
+#endif
+
#endif /* !(__BEN_VLAN_PROC_INC__) */