[PATCH] 9p: fix compile error if !CONFIG_SYSCTL

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Herrmann
Date: Tuesday, September 18, 2007 - 1:05 am

Fix compile error if !CONFIG_SYSCTL:

    ...
  LD      .tmp_vmlinux1
net/built-in.o: In function `init_p9':
net/9p/mod.c:59: undefined reference to `p9_sysctl_register'
net/built-in.o: In function `exit_p9':
net/9p/mod.c:75: undefined reference to `p9_sysctl_unregister'
make: *** [.tmp_vmlinux1] Error 1
    ...

Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
---
 include/net/9p/9p.h |    4 ++++
 net/9p/mod.c        |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 88884d3..f723a03 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -412,6 +412,10 @@ int p9_idpool_check(int id, struct p9_idpool *p);
 
 int p9_error_init(void);
 int p9_errstr2errno(char *, int);
+
+#ifdef CONFIG_SYSCTL
 int __init p9_sysctl_register(void);
 void __exit p9_sysctl_unregister(void);
+#endif
+
 #endif /* NET_9P_H */
diff --git a/net/9p/mod.c b/net/9p/mod.c
index 4f9e1d2..b4d435c 100644
--- a/net/9p/mod.c
+++ b/net/9p/mod.c
@@ -56,11 +56,13 @@ static int __init init_p9(void)
 		return ret;
 	}
 
+#ifdef CONFIG_SYSCTL
 	ret = p9_sysctl_register();
 	if (ret) {
 		printk(KERN_WARNING "9p: registering sysctl failed\n");
 		return ret;
 	}
+#endif
 
 	return ret;
 }
@@ -72,7 +74,9 @@ static int __init init_p9(void)
 
 static void __exit exit_p9(void)
 {
+#ifdef CONFIG_SYSCTL
 	p9_sysctl_unregister();
+#endif
 	p9_mux_global_exit();
 }
 
-- 
1.5.3


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andreas Herrmann, (Tue Sep 18, 1:05 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andreas Herrmann, (Tue Sep 18, 1:15 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andrew Morton, (Wed Sep 19, 11:31 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Andreas Herrmann, (Thu Sep 20, 12:23 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Nick Piggin, (Thu Sep 27, 2:40 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Nick Piggin, (Thu Sep 27, 5:05 pm)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Linus Torvalds, (Fri Sep 28, 7:34 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Arjan van de Ven, (Fri Sep 28, 10:11 am)
Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL, Elyse M. Grasso, (Fri Sep 28, 10:12 am)
Re: A bit of kconfig rewrite (Re: [PATCH] 9p: fix compile ..., Geert Uytterhoeven, (Sun Oct 7, 2:49 am)