提交 5575d0a3 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

m68k/atari/debug.c: possible cleanups

This patch contains the following possible cleanups:
- make the following needlessly global functions (always) static:
  - atari_mfp_console_write()
  - atari_scc_console_write()
  - atari_midi_console_write()
  - atari_init_mfp_port()
  - atari_init_scc_port()
  - atari_init_midi_port()
- #if 0 the following unused functions:
  - atari_mfp_console_wait_key()
  - atari_scc_console_wait_key()
  - atari_midi_console_wait_key()
- remove the following unused variables:
  - atari_MFP_init_done
  - atari_SCC_init_done
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0795dbcc
......@@ -20,14 +20,6 @@
#include <asm/atarihw.h>
#include <asm/atariints.h>
/* Flag that Modem1 port is already initialized and used */
int atari_MFP_init_done;
EXPORT_SYMBOL(atari_MFP_init_done);
/* Flag that Modem1 port is already initialized and used */
int atari_SCC_init_done;
EXPORT_SYMBOL(atari_SCC_init_done);
/* Can be set somewhere, if a SCC master reset has already be done and should
* not be repeated; used by kgdb */
int atari_SCC_reset_done;
......@@ -47,8 +39,8 @@ static inline void ata_mfp_out(char c)
mfp.usart_dta = c;
}
void atari_mfp_console_write(struct console *co, const char *str,
unsigned int count)
static void atari_mfp_console_write(struct console *co, const char *str,
unsigned int count)
{
while (count--) {
if (*str == '\n')
......@@ -66,8 +58,8 @@ static inline void ata_scc_out(char c)
scc.cha_b_data = c;
}
void atari_scc_console_write(struct console *co, const char *str,
unsigned int count)
static void atari_scc_console_write(struct console *co, const char *str,
unsigned int count)
{
while (count--) {
if (*str == '\n')
......@@ -83,8 +75,8 @@ static inline void ata_midi_out(char c)
acia.mid_data = c;
}
void atari_midi_console_write(struct console *co, const char *str,
unsigned int count)
static void atari_midi_console_write(struct console *co, const char *str,
unsigned int count)
{
while (count--) {
if (*str == '\n')
......@@ -136,7 +128,7 @@ static void atari_par_console_write(struct console *co, const char *str,
}
}
#ifdef CONFIG_SERIAL_CONSOLE
#if 0
int atari_mfp_console_wait_key(struct console *co)
{
while (!(mfp.rcv_stat & 0x80)) /* wait for rx buf filled */
......@@ -166,11 +158,7 @@ int atari_midi_console_wait_key(struct console *co)
* SCC serial ports. They're used by the debugging interface, kgdb, and the
* serial console code.
*/
#ifndef CONFIG_SERIAL_CONSOLE
static void __init atari_init_mfp_port(int cflag)
#else
void atari_init_mfp_port(int cflag)
#endif
{
/*
* timer values for 1200...115200 bps; > 38400 select 110, 134, or 150
......@@ -193,8 +181,6 @@ void atari_init_mfp_port(int cflag)
mfp.tim_dt_d = baud_table[baud];
mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */
mfp.trn_stat |= 0x01; /* enable TX */
atari_MFP_init_done = 1;
}
#define SCC_WRITE(reg, val) \
......@@ -214,11 +200,7 @@ void atari_init_mfp_port(int cflag)
MFPDELAY(); \
} while (0)
#ifndef CONFIG_SERIAL_CONSOLE
static void __init atari_init_scc_port(int cflag)
#else
void atari_init_scc_port(int cflag)
#endif
{
extern int atari_SCC_reset_done;
static int clksrc_table[9] =
......@@ -277,14 +259,9 @@ void atari_init_scc_port(int cflag)
SCC_WRITE(5, reg5 | 8);
atari_SCC_reset_done = 1;
atari_SCC_init_done = 1;
}
#ifndef CONFIG_SERIAL_CONSOLE
static void __init atari_init_midi_port(int cflag)
#else
void atari_init_midi_port(int cflag)
#endif
{
int baud = cflag & CBAUD;
int csize = ((cflag & CSIZE) == CS8) ? 0x10 : 0x00;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册