diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-06-25 17:58:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:56 -0400 |
commit | e3ca5e762c2aca373f1762cbc622ebe20fd20869 (patch) | |
tree | 88e4265d0e12f6b42a23e56355679a87e278f867 /drivers/isdn/sc/command.c | |
parent | 594dd2c98101a5dc279153ec806d554e6b8a1e35 (diff) |
[PATCH] drivers/isdn/sc/: possible cleanups
This patch contains the following possible cleanips:
- make some needlessly global code static
- remove the compiled but completely unused debug.c
- remove or #if 0 the following unused global functions:
- command.c: loopback
- command.c: loadproc
- init.c: irq_supported
- packet.c: print_skb
- shmem.c: memset_shmem
- timer.c: trace_timer
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/sc/command.c')
-rw-r--r-- | drivers/isdn/sc/command.c | 88 |
1 files changed, 16 insertions, 72 deletions
diff --git a/drivers/isdn/sc/command.c b/drivers/isdn/sc/command.c index b2c4eac7cef5..19f2fcf0ae4a 100644 --- a/drivers/isdn/sc/command.c +++ b/drivers/isdn/sc/command.c | |||
@@ -22,14 +22,14 @@ | |||
22 | #include "card.h" | 22 | #include "card.h" |
23 | #include "scioc.h" | 23 | #include "scioc.h" |
24 | 24 | ||
25 | int dial(int card, unsigned long channel, setup_parm setup); | 25 | static int dial(int card, unsigned long channel, setup_parm setup); |
26 | int hangup(int card, unsigned long channel); | 26 | static int hangup(int card, unsigned long channel); |
27 | int answer(int card, unsigned long channel); | 27 | static int answer(int card, unsigned long channel); |
28 | int clreaz(int card, unsigned long channel); | 28 | static int clreaz(int card, unsigned long channel); |
29 | int seteaz(int card, unsigned long channel, char *); | 29 | static int seteaz(int card, unsigned long channel, char *); |
30 | int setl2(int card, unsigned long arg); | 30 | static int setl2(int card, unsigned long arg); |
31 | int setl3(int card, unsigned long arg); | 31 | static int setl3(int card, unsigned long arg); |
32 | int acceptb(int card, unsigned long channel); | 32 | static int acceptb(int card, unsigned long channel); |
33 | 33 | ||
34 | extern int cinst; | 34 | extern int cinst; |
35 | extern board *sc_adapter[]; | 35 | extern board *sc_adapter[]; |
@@ -148,56 +148,6 @@ int command(isdn_ctrl *cmd) | |||
148 | } | 148 | } |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * Confirm our ability to communicate with the board. This test assumes no | ||
152 | * other message activity is present | ||
153 | */ | ||
154 | int loopback(int card) | ||
155 | { | ||
156 | |||
157 | int status; | ||
158 | static char testmsg[] = "Test Message"; | ||
159 | RspMessage rspmsg; | ||
160 | |||
161 | if(!IS_VALID_CARD(card)) { | ||
162 | pr_debug("Invalid param: %d is not a valid card id\n", card); | ||
163 | return -ENODEV; | ||
164 | } | ||
165 | |||
166 | pr_debug("%s: Sending loopback message\n", | ||
167 | sc_adapter[card]->devicename); | ||
168 | |||
169 | /* | ||
170 | * Send the loopback message to confirm that memory transfer is | ||
171 | * operational | ||
172 | */ | ||
173 | status = send_and_receive(card, CMPID, cmReqType1, | ||
174 | cmReqClass0, | ||
175 | cmReqMsgLpbk, | ||
176 | 0, | ||
177 | (unsigned char) strlen(testmsg), | ||
178 | (unsigned char *)testmsg, | ||
179 | &rspmsg, SAR_TIMEOUT); | ||
180 | |||
181 | |||
182 | if (!status) { | ||
183 | pr_debug("%s: Loopback message successfully sent\n", | ||
184 | sc_adapter[card]->devicename); | ||
185 | if(strcmp(rspmsg.msg_data.byte_array, testmsg)) { | ||
186 | pr_debug("%s: Loopback return != sent\n", | ||
187 | sc_adapter[card]->devicename); | ||
188 | return -EIO; | ||
189 | } | ||
190 | return 0; | ||
191 | } | ||
192 | else { | ||
193 | pr_debug("%s: Send loopback message failed\n", | ||
194 | sc_adapter[card]->devicename); | ||
195 | return -EIO; | ||
196 | } | ||
197 | |||
198 | } | ||
199 | |||
200 | /* | ||
201 | * start the onboard firmware | 151 | * start the onboard firmware |
202 | */ | 152 | */ |
203 | int startproc(int card) | 153 | int startproc(int card) |
@@ -222,16 +172,10 @@ int startproc(int card) | |||
222 | } | 172 | } |
223 | 173 | ||
224 | 174 | ||
225 | int loadproc(int card, char *data) | ||
226 | { | ||
227 | return -1; | ||
228 | } | ||
229 | |||
230 | |||
231 | /* | 175 | /* |
232 | * Dials the number passed in | 176 | * Dials the number passed in |
233 | */ | 177 | */ |
234 | int dial(int card, unsigned long channel, setup_parm setup) | 178 | static int dial(int card, unsigned long channel, setup_parm setup) |
235 | { | 179 | { |
236 | int status; | 180 | int status; |
237 | char Phone[48]; | 181 | char Phone[48]; |
@@ -261,7 +205,7 @@ int dial(int card, unsigned long channel, setup_parm setup) | |||
261 | /* | 205 | /* |
262 | * Answer an incoming call | 206 | * Answer an incoming call |
263 | */ | 207 | */ |
264 | int answer(int card, unsigned long channel) | 208 | static int answer(int card, unsigned long channel) |
265 | { | 209 | { |
266 | if(!IS_VALID_CARD(card)) { | 210 | if(!IS_VALID_CARD(card)) { |
267 | pr_debug("Invalid param: %d is not a valid card id\n", card); | 211 | pr_debug("Invalid param: %d is not a valid card id\n", card); |
@@ -282,7 +226,7 @@ int answer(int card, unsigned long channel) | |||
282 | /* | 226 | /* |
283 | * Hangup up the call on specified channel | 227 | * Hangup up the call on specified channel |
284 | */ | 228 | */ |
285 | int hangup(int card, unsigned long channel) | 229 | static int hangup(int card, unsigned long channel) |
286 | { | 230 | { |
287 | int status; | 231 | int status; |
288 | 232 | ||
@@ -305,7 +249,7 @@ int hangup(int card, unsigned long channel) | |||
305 | /* | 249 | /* |
306 | * Set the layer 2 protocol (X.25, HDLC, Raw) | 250 | * Set the layer 2 protocol (X.25, HDLC, Raw) |
307 | */ | 251 | */ |
308 | int setl2(int card, unsigned long arg) | 252 | static int setl2(int card, unsigned long arg) |
309 | { | 253 | { |
310 | int status =0; | 254 | int status =0; |
311 | int protocol,channel; | 255 | int protocol,channel; |
@@ -340,7 +284,7 @@ int setl2(int card, unsigned long arg) | |||
340 | /* | 284 | /* |
341 | * Set the layer 3 protocol | 285 | * Set the layer 3 protocol |
342 | */ | 286 | */ |
343 | int setl3(int card, unsigned long channel) | 287 | static int setl3(int card, unsigned long channel) |
344 | { | 288 | { |
345 | int protocol = channel >> 8; | 289 | int protocol = channel >> 8; |
346 | 290 | ||
@@ -355,7 +299,7 @@ int setl3(int card, unsigned long channel) | |||
355 | return 0; | 299 | return 0; |
356 | } | 300 | } |
357 | 301 | ||
358 | int acceptb(int card, unsigned long channel) | 302 | static int acceptb(int card, unsigned long channel) |
359 | { | 303 | { |
360 | if(!IS_VALID_CARD(card)) { | 304 | if(!IS_VALID_CARD(card)) { |
361 | pr_debug("Invalid param: %d is not a valid card id\n", card); | 305 | pr_debug("Invalid param: %d is not a valid card id\n", card); |
@@ -374,7 +318,7 @@ int acceptb(int card, unsigned long channel) | |||
374 | return 0; | 318 | return 0; |
375 | } | 319 | } |
376 | 320 | ||
377 | int clreaz(int card, unsigned long arg) | 321 | static int clreaz(int card, unsigned long arg) |
378 | { | 322 | { |
379 | if(!IS_VALID_CARD(card)) { | 323 | if(!IS_VALID_CARD(card)) { |
380 | pr_debug("Invalid param: %d is not a valid card id\n", card); | 324 | pr_debug("Invalid param: %d is not a valid card id\n", card); |
@@ -388,7 +332,7 @@ int clreaz(int card, unsigned long arg) | |||
388 | return 0; | 332 | return 0; |
389 | } | 333 | } |
390 | 334 | ||
391 | int seteaz(int card, unsigned long arg, char *num) | 335 | static int seteaz(int card, unsigned long arg, char *num) |
392 | { | 336 | { |
393 | if(!IS_VALID_CARD(card)) { | 337 | if(!IS_VALID_CARD(card)) { |
394 | pr_debug("Invalid param: %d is not a valid card id\n", card); | 338 | pr_debug("Invalid param: %d is not a valid card id\n", card); |