Messages in this thread Patch in this message | | | Date | Sat, 12 Apr 2008 23:39:14 +0800 (CST) | Subject | [Patch] UML: Fix another build error | From | WANG Cong <> |
| |
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@addtoit.com> Signed-off-by: WANG Cong <wangcong@zeuux.org>
--- 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
| |