]> git.hungrycats.org Git - linux/commitdiff
[PATCH] uml: fix an "unused" warnings
authorPaolo \'Blaisorblade\' Giarrusso <blaisorblade_spam@yahoo.it>
Wed, 13 Oct 2004 14:29:10 +0000 (07:29 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 13 Oct 2004 14:29:10 +0000 (07:29 -0700)
Fixes some random warnings.  To avoid "defined but not used" for
not_configged_ops, make it be defined only if at least one channel is not
defined.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/Kconfig_char
arch/um/drivers/chan_kern.c

index 8a6afe659c0e3d0a577ea22198bccf2ad5ee4eaf..09f47388c7c5ea148d054154c0a8e3c8cf1a2d61 100644 (file)
@@ -72,6 +72,10 @@ config XTERM_CHAN
         well, since UML's gdb currently requires an xterm.
         It is safe to say 'Y' here.
 
+config NOCONFIG_CHAN
+       bool
+       default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && FD_CHAN && NULL_CHAN)
+
 config CON_ZERO_CHAN
        string "Default main console channel initialization"
        default "fd:0,fd:1"
index 1eaeecf66966c587f3f641342aa7175924457d4a..7a8d750864694e8d9490ff92ed7760664c5385b2 100644 (file)
@@ -19,6 +19,7 @@
 #include "line.h"
 #include "os.h"
 
+#ifdef CONFIG_NOCONFIG_CHAN
 static void *not_configged_init(char *str, int device, struct chan_opts *opts)
 {
        printk(KERN_ERR "Using a channel type which is configured out of "
@@ -87,6 +88,7 @@ static struct chan_ops not_configged_ops = {
        .free           = not_configged_free,
        .winch          = 0,
 };
+#endif /* CONFIG_NOCONFIG_CHAN */
 
 void generic_close(int fd, void *unused)
 {