]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
m68k: Disable Amiga serial console support if modular
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 26 Oct 2008 18:51:14 +0000 (19:51 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 26 Oct 2008 19:11:21 +0000 (12:11 -0700)
If CONFIG_AMIGA_BUILTIN_SERIAL=m, I get the following warnings:

| drivers/char/amiserial.c: At top level:
| drivers/char/amiserial.c:2138: warning: data definition has no type or storage class
| drivers/char/amiserial.c:2138: warning: type defaults to 'int' in declaration of 'console_initcall'
| drivers/char/amiserial.c:2138: warning: parameter names (without types) in function declaration
| drivers/char/amiserial.c:2134: warning: 'amiserial_console_init' defined but not used

because console_initcall() is not defined (nor really sensible) in the
modular case.

So disable serial console support if the driver is modular.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/amiserial.c

index 98821f97583c680b9ddc222d8c15e9909c0feb6b..b97aebd7aeb8d84af42f72291b06ecb3dcb6dff8 100644 (file)
@@ -2071,12 +2071,13 @@ module_init(rs_init)
 module_exit(rs_exit)
 
 
+#if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE)
+
 /*
  * ------------------------------------------------------------
  * Serial console driver
  * ------------------------------------------------------------
  */
-#ifdef CONFIG_SERIAL_CONSOLE
 
 static void amiga_serial_putc(char c)
 {
@@ -2130,6 +2131,7 @@ static int __init amiserial_console_init(void)
        return 0;
 }
 console_initcall(amiserial_console_init);
-#endif
+
+#endif /* CONFIG_SERIAL_CONSOLE && !MODULE */
 
 MODULE_LICENSE("GPL");