linux/debian/patches/bugfix/m68k/2.6.27/atari-scc-no-serial-console...

50 lines
1.6 KiB
Diff

Subject: [PATCH] m68k: Disable Atari serial console support if modular
From: Geert Uytterhoeven <geert@linux-m68k.org>
If CONFIG_ATARI_SCC=m, I get the following warnings:
| drivers/char/atari_scc.c: At top level:
| drivers/char/atari_scc.c:1573: warning: data definition has no type or storage class
| drivers/char/atari_scc.c:1573: warning: type defaults to 'int' in declaration of 'console_initcall'
| drivers/char/atari_scc.c:1573: warning: parameter names (without types) in function declaration
| drivers/char/atari_scc.c:1567: warning: 'atari_scc_console_init' defined but not used
Apparently console_initcall() is not defined in the modular case.
Disable serial console support if the driver is modular.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Any better alternative fix?
---
drivers/char/atari_scc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/char/atari_scc.c
+++ b/drivers/char/atari_scc.c
@@ -1401,10 +1401,12 @@ static int scc_break_ctl(struct tty_stru
}
+#if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE)
+
/*---------------------------------------------------------------------------
* Serial console stuff...
*--------------------------------------------------------------------------*/
-#if 1
+
#define scc_delay() \
asm volatile ("tstb %0" : : "m" (*scc_del) : "cc")
@@ -1571,7 +1573,8 @@ static int __init atari_scc_console_init
}
console_initcall(atari_scc_console_init);
-#endif
+
+#endif /* CONFIG_SERIAL_CONSOLE && !MODULE */
/***************************** End of Functions *********************/