Commit 5575d0a3c9676b2886adad67dd4b2ac126a49f1f
Committed by
Linus Torvalds
1 parent
0795dbcc4c
Exists in
master
and in
7 other branches
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: Adrian Bunk <bunk@kernel.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 7 additions and 30 deletions Side-by-side Diff
arch/m68k/atari/debug.c
... | ... | @@ -20,14 +20,6 @@ |
20 | 20 | #include <asm/atarihw.h> |
21 | 21 | #include <asm/atariints.h> |
22 | 22 | |
23 | -/* Flag that Modem1 port is already initialized and used */ | |
24 | -int atari_MFP_init_done; | |
25 | -EXPORT_SYMBOL(atari_MFP_init_done); | |
26 | - | |
27 | -/* Flag that Modem1 port is already initialized and used */ | |
28 | -int atari_SCC_init_done; | |
29 | -EXPORT_SYMBOL(atari_SCC_init_done); | |
30 | - | |
31 | 23 | /* Can be set somewhere, if a SCC master reset has already be done and should |
32 | 24 | * not be repeated; used by kgdb */ |
33 | 25 | int atari_SCC_reset_done; |
... | ... | @@ -47,8 +39,8 @@ |
47 | 39 | mfp.usart_dta = c; |
48 | 40 | } |
49 | 41 | |
50 | -void atari_mfp_console_write(struct console *co, const char *str, | |
51 | - unsigned int count) | |
42 | +static void atari_mfp_console_write(struct console *co, const char *str, | |
43 | + unsigned int count) | |
52 | 44 | { |
53 | 45 | while (count--) { |
54 | 46 | if (*str == '\n') |
... | ... | @@ -66,8 +58,8 @@ |
66 | 58 | scc.cha_b_data = c; |
67 | 59 | } |
68 | 60 | |
69 | -void atari_scc_console_write(struct console *co, const char *str, | |
70 | - unsigned int count) | |
61 | +static void atari_scc_console_write(struct console *co, const char *str, | |
62 | + unsigned int count) | |
71 | 63 | { |
72 | 64 | while (count--) { |
73 | 65 | if (*str == '\n') |
... | ... | @@ -83,8 +75,8 @@ |
83 | 75 | acia.mid_data = c; |
84 | 76 | } |
85 | 77 | |
86 | -void atari_midi_console_write(struct console *co, const char *str, | |
87 | - unsigned int count) | |
78 | +static void atari_midi_console_write(struct console *co, const char *str, | |
79 | + unsigned int count) | |
88 | 80 | { |
89 | 81 | while (count--) { |
90 | 82 | if (*str == '\n') |
... | ... | @@ -136,7 +128,7 @@ |
136 | 128 | } |
137 | 129 | } |
138 | 130 | |
139 | -#ifdef CONFIG_SERIAL_CONSOLE | |
131 | +#if 0 | |
140 | 132 | int atari_mfp_console_wait_key(struct console *co) |
141 | 133 | { |
142 | 134 | while (!(mfp.rcv_stat & 0x80)) /* wait for rx buf filled */ |
143 | 135 | |
... | ... | @@ -166,11 +158,7 @@ |
166 | 158 | * SCC serial ports. They're used by the debugging interface, kgdb, and the |
167 | 159 | * serial console code. |
168 | 160 | */ |
169 | -#ifndef CONFIG_SERIAL_CONSOLE | |
170 | 161 | static void __init atari_init_mfp_port(int cflag) |
171 | -#else | |
172 | -void atari_init_mfp_port(int cflag) | |
173 | -#endif | |
174 | 162 | { |
175 | 163 | /* |
176 | 164 | * timer values for 1200...115200 bps; > 38400 select 110, 134, or 150 |
... | ... | @@ -193,8 +181,6 @@ |
193 | 181 | mfp.tim_dt_d = baud_table[baud]; |
194 | 182 | mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */ |
195 | 183 | mfp.trn_stat |= 0x01; /* enable TX */ |
196 | - | |
197 | - atari_MFP_init_done = 1; | |
198 | 184 | } |
199 | 185 | |
200 | 186 | #define SCC_WRITE(reg, val) \ |
201 | 187 | |
... | ... | @@ -214,11 +200,7 @@ |
214 | 200 | MFPDELAY(); \ |
215 | 201 | } while (0) |
216 | 202 | |
217 | -#ifndef CONFIG_SERIAL_CONSOLE | |
218 | 203 | static void __init atari_init_scc_port(int cflag) |
219 | -#else | |
220 | -void atari_init_scc_port(int cflag) | |
221 | -#endif | |
222 | 204 | { |
223 | 205 | extern int atari_SCC_reset_done; |
224 | 206 | static int clksrc_table[9] = |
225 | 207 | |
226 | 208 | |
... | ... | @@ -277,14 +259,9 @@ |
277 | 259 | SCC_WRITE(5, reg5 | 8); |
278 | 260 | |
279 | 261 | atari_SCC_reset_done = 1; |
280 | - atari_SCC_init_done = 1; | |
281 | 262 | } |
282 | 263 | |
283 | -#ifndef CONFIG_SERIAL_CONSOLE | |
284 | 264 | static void __init atari_init_midi_port(int cflag) |
285 | -#else | |
286 | -void atari_init_midi_port(int cflag) | |
287 | -#endif | |
288 | 265 | { |
289 | 266 | int baud = cflag & CBAUD; |
290 | 267 | int csize = ((cflag & CSIZE) == CS8) ? 0x10 : 0x00; |