[PATCH] proc: fix linkage with CONFIG_SYSCTL=y, CONFIG_PROC_SYSCTL=n
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Apr 2007 06:49:35 +0000 (23:49 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 2 Apr 2007 17:06:08 +0000 (10:06 -0700)
We're using #ifdef CONFIG_SYSCTL, but we should be using CONFIG_PROC_SYSCTL,
so we get

 fs/built-in.o: In function `proc_root_init':
 /usr/src/linux/fs/proc/root.c:83: undefined reference to `proc_sys_init'

Fix that up and remove an ifdef-in-C.

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Helge Hafting <helgehaf@aitel.hist.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/internal.h
fs/proc/root.c

index c932aa65e19816e85ca78d95b2795e80513e0409..f771889183c36fe52062267ffde5d139ca18c76b 100644 (file)
 
 #include <linux/proc_fs.h>
 
+#ifdef CONFIG_PROC_SYSCTL
 extern int proc_sys_init(void);
+#else
+static inline void proc_sys_init(void) { }
+#endif
 
 struct vmalloc_info {
        unsigned long   used;
index 5834a744c2a96fec843290a83a38c090f34618d5..41f17037f73890ad5551651bc776446c3798ac68 100644 (file)
@@ -79,9 +79,7 @@ void __init proc_root_init(void)
        proc_device_tree_init();
 #endif
        proc_bus = proc_mkdir("bus", NULL);
-#ifdef CONFIG_SYSCTL
        proc_sys_init();
-#endif
 }
 
 static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat