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 Signed-off-by: WANG Cong --- 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Ç+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥