[Patch] UML: Fix another build error
From: WANG Cong
Date: Sat Apr 12 2008 - 11:43:16 EST
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 <jdike@xxxxxxxxxxx>
Signed-off-by: WANG Cong <wangcong@xxxxxxxxx>
---
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
èº{.nÇ+·®+%Ëlzwm
ébëæìr¸zX§»®w¥{ayºÊÚë,j¢f£¢·hàz¹®w¥¢¸¢·¦j:+v¨wèjØm¶ÿ¾«êçzZ+ùÝj"ú!¶iOæ¬z·vØ^¶m§ÿðÃnÆàþY&