This patch fixes the following build error.

  CC      arch/um/drivers/mconsole_kern.o
/home/wangcong/projects/linux-2.6/arch/um/drivers/mconsole_kern.c:337: error: 
redefinition of ‘mconsole_register_dev’
/home/wangcong/projects/linux-2.6/arch/um/include/mconsole_kern.h:47: error: 
previous definition of ‘mconsole_register_dev’ was here
make[2]: *** [arch/um/drivers/mconsole_kern.o] Error 1
make[1]: *** [arch/um/drivers/mconsole_kern.ko] Error 2
make: *** [sub-make] Error 2

Compile testing passed.

Cc: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

---
 arch/um/drivers/mconsole_kern.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 19d579d..e94ccb8 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -330,9 +330,12 @@ void mconsole_stop(struct mc_request *req)
        mconsole_reply(req, "", 0, 0);
 }
 
-static DEFINE_SPINLOCK(mc_devices_lock);
 static LIST_HEAD(mconsole_devices);
 
+#ifdef CONFIG_MCONSOLE
+
+static DEFINE_SPINLOCK(mc_devices_lock);
+
 void mconsole_register_dev(struct mc_device *new)
 {
        spin_lock(&mc_devices_lock);
@@ -340,6 +343,7 @@ void mconsole_register_dev(struct mc_device *new)
        list_add(&new->list, &mconsole_devices);
        spin_unlock(&mc_devices_lock);
 }
+#endif
 
 static struct mc_device *mconsole_find_dev(char *name)
 {
-- 
1.5.2.4

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to