Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

m68k: Disable Amiga serial console support if modular

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>

authored by

Geert Uytterhoeven and committed by
Linus Torvalds
d1a35e4d 9ce209d6

+4 -2
+4 -2
drivers/char/amiserial.c
··· 2071 2071 module_exit(rs_exit) 2072 2072 2073 2073 2074 + #if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE) 2075 + 2074 2076 /* 2075 2077 * ------------------------------------------------------------ 2076 2078 * Serial console driver 2077 2079 * ------------------------------------------------------------ 2078 2080 */ 2079 - #ifdef CONFIG_SERIAL_CONSOLE 2080 2081 2081 2082 static void amiga_serial_putc(char c) 2082 2083 { ··· 2131 2130 return 0; 2132 2131 } 2133 2132 console_initcall(amiserial_console_init); 2134 - #endif 2133 + 2134 + #endif /* CONFIG_SERIAL_CONSOLE && !MODULE */ 2135 2135 2136 2136 MODULE_LICENSE("GPL");