Skip to content

Commit d1a35e4

Browse files
geertutorvalds
authored andcommitted
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9ce209d commit d1a35e4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/char/amiserial.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,12 +2071,13 @@ module_init(rs_init)
20712071
module_exit(rs_exit)
20722072

20732073

2074+
#if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE)
2075+
20742076
/*
20752077
* ------------------------------------------------------------
20762078
* Serial console driver
20772079
* ------------------------------------------------------------
20782080
*/
2079-
#ifdef CONFIG_SERIAL_CONSOLE
20802081

20812082
static void amiga_serial_putc(char c)
20822083
{
@@ -2130,6 +2131,7 @@ static int __init amiserial_console_init(void)
21302131
return 0;
21312132
}
21322133
console_initcall(amiserial_console_init);
2133-
#endif
2134+
2135+
#endif /* CONFIG_SERIAL_CONSOLE && !MODULE */
21342136

21352137
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)