aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2008-12-13 00:15:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-13 00:15:17 -0500
commit5b8343540a3d27f87a4d9d72bb39b7d4cc3dd95e (patch)
tree38671546aab7418067af9b5fca08b79e9307f3f0 /drivers/isdn/mISDN
parentdfa96ec1bb83641242c48883c2bae8f1f30483b2 (diff)
mISDN: make global symbols static or include header files
The warnings fixed by including an header file for the appropriate prototype are marked with "*", for all others the corresonponding symbol has been made static. This patch fixes all such issues in mISDN. Fix this sparse warnings: drivers/isdn/hardware/mISDN/hfcmulti.c:174:5: warning: symbol 'plxsd_master' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:426:1: warning: symbol 'write_fifo_regio' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:447:1: warning: symbol 'write_fifo_pcimem' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:469:1: warning: symbol 'read_fifo_regio' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:491:1: warning: symbol 'read_fifo_pcimem' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:710:1: warning: symbol 'vpm_init' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:793:1: warning: symbol 'vpm_check' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:816:1: warning: symbol 'vpm_echocan_on' was not declared. Should it be static? drivers/isdn/hardware/mISDN/hfcmulti.c:848:1: warning: symbol 'vpm_echocan_off' was not declared. Should it be static? * drivers/isdn/mISDN/l1oip_codec.c:224:1: warning: symbol 'l1oip_law_to_4bit' was not declared. Should it be static? * drivers/isdn/mISDN/l1oip_codec.c:261:1: warning: symbol 'l1oip_4bit_to_law' was not declared. Should it be static? * drivers/isdn/mISDN/l1oip_codec.c:281:1: warning: symbol 'l1oip_alaw_to_ulaw' was not declared. Should it be static? * drivers/isdn/mISDN/l1oip_codec.c:294:1: warning: symbol 'l1oip_ulaw_to_alaw' was not declared. Should it be static? * drivers/isdn/mISDN/l1oip_codec.c:311:1: warning: symbol 'l1oip_4bit_free' was not declared. Should it be static? * drivers/isdn/mISDN/l1oip_codec.c:322:1: warning: symbol 'l1oip_4bit_alloc' was not declared. Should it be static? drivers/isdn/mISDN/core.c:29:1: warning: symbol 'device_lock' was not declared. Should it be static? drivers/isdn/mISDN/core.c:34:1: warning: symbol 'bp_lock' was not declared. Should it be static? drivers/isdn/mISDN/core.c:196:1: warning: symbol 'mISDNInit' was not declared. Should it be static? drivers/isdn/mISDN/core.c:227:6: warning: symbol 'mISDN_cleanup' was not declared. Should it be static? drivers/isdn/mISDN/stack.c:40:1: warning: symbol 'mISDN_queue_message' was not declared. Should it be static? * drivers/isdn/mISDN/layer1.c:388:1: warning: symbol 'l1_init' was not declared. Should it be static? * drivers/isdn/mISDN/layer1.c:400:1: warning: symbol 'l1_cleanup' was not declared. Should it be static? drivers/isdn/mISDN/layer2.c:469:1: warning: symbol 'iframe_error' was not declared. Should it be static? drivers/isdn/mISDN/layer2.c:487:1: warning: symbol 'super_error' was not declared. Should it be static? drivers/isdn/mISDN/layer2.c:496:1: warning: symbol 'unnum_error' was not declared. Should it be static? drivers/isdn/mISDN/layer2.c:509:1: warning: symbol 'UI_error' was not declared. Should it be static? drivers/isdn/mISDN/layer2.c:522:1: warning: symbol 'FRMR_error' was not declared. Should it be static? drivers/isdn/mISDN/layer2.c:1069:1: warning: symbol 'enquiry_cr' was not declared. Should it be static? * drivers/isdn/mISDN/layer2.c:2196:1: warning: symbol 'Isdnl2_Init' was not declared. Should it be static? * drivers/isdn/mISDN/layer2.c:2210:1: warning: symbol 'Isdnl2_cleanup' was not declared. Should it be static? drivers/isdn/mISDN/tei.c:397:1: warning: symbol 'random_ri' was not declared. Should it be static? * drivers/isdn/mISDN/timerdev.c:277:1: warning: symbol 'mISDN_inittimer' was not declared. Should it be static? * drivers/isdn/mISDN/timerdev.c:288:6: warning: symbol 'mISDN_timer_cleanup' was not declared. Should it be static? drivers/isdn/mISDN/dsp_core.c:164:12: warning: symbol 'mISDN_dsp_revision' was not declared. Should it be static? drivers/isdn/mISDN/dsp_cmx.c:1543:5: warning: symbol 'samplecount' was not declared. Should it be static? drivers/isdn/mISDN/dsp_cmx.c:1546:5: warning: symbol 'dsp_start_jiffies' was not declared. Should it be static? drivers/isdn/mISDN/dsp_cmx.c:1547:16: warning: symbol 'dsp_start_tv' was not declared. Should it be static? drivers/isdn/mISDN/dsp_tones.c:239:3: warning: symbol 'pattern' was not declared. Should it be static? drivers/isdn/mISDN/dsp_audio.c:33:4: warning: symbol 'dsp_audio_ulaw_to_alaw' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r--drivers/isdn/mISDN/core.c8
-rw-r--r--drivers/isdn/mISDN/dsp_audio.c2
-rw-r--r--drivers/isdn/mISDN/dsp_cmx.c6
-rw-r--r--drivers/isdn/mISDN/dsp_core.c2
-rw-r--r--drivers/isdn/mISDN/dsp_tones.c2
-rw-r--r--drivers/isdn/mISDN/l1oip_codec.c1
-rw-r--r--drivers/isdn/mISDN/layer1.c1
-rw-r--r--drivers/isdn/mISDN/layer2.c14
-rw-r--r--drivers/isdn/mISDN/stack.c2
-rw-r--r--drivers/isdn/mISDN/tei.c2
-rw-r--r--drivers/isdn/mISDN/timerdev.c1
11 files changed, 23 insertions, 18 deletions
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c
index 33068177b7c9..751665c448d0 100644
--- a/drivers/isdn/mISDN/core.c
+++ b/drivers/isdn/mISDN/core.c
@@ -26,12 +26,12 @@ MODULE_LICENSE("GPL");
26module_param(debug, uint, S_IRUGO | S_IWUSR); 26module_param(debug, uint, S_IRUGO | S_IWUSR);
27 27
28static LIST_HEAD(devices); 28static LIST_HEAD(devices);
29DEFINE_RWLOCK(device_lock); 29static DEFINE_RWLOCK(device_lock);
30static u64 device_ids; 30static u64 device_ids;
31#define MAX_DEVICE_ID 63 31#define MAX_DEVICE_ID 63
32 32
33static LIST_HEAD(Bprotocols); 33static LIST_HEAD(Bprotocols);
34DEFINE_RWLOCK(bp_lock); 34static DEFINE_RWLOCK(bp_lock);
35 35
36struct mISDNdevice 36struct mISDNdevice
37*get_mdevice(u_int id) 37*get_mdevice(u_int id)
@@ -192,7 +192,7 @@ mISDN_unregister_Bprotocol(struct Bprotocol *bp)
192} 192}
193EXPORT_SYMBOL(mISDN_unregister_Bprotocol); 193EXPORT_SYMBOL(mISDN_unregister_Bprotocol);
194 194
195int 195static int
196mISDNInit(void) 196mISDNInit(void)
197{ 197{
198 int err; 198 int err;
@@ -224,7 +224,7 @@ error:
224 return err; 224 return err;
225} 225}
226 226
227void mISDN_cleanup(void) 227static void mISDN_cleanup(void)
228{ 228{
229 misdn_sock_cleanup(); 229 misdn_sock_cleanup();
230 mISDN_timer_cleanup(); 230 mISDN_timer_cleanup();
diff --git a/drivers/isdn/mISDN/dsp_audio.c b/drivers/isdn/mISDN/dsp_audio.c
index 1c2dd5694773..de3795e3f432 100644
--- a/drivers/isdn/mISDN/dsp_audio.c
+++ b/drivers/isdn/mISDN/dsp_audio.c
@@ -30,7 +30,7 @@ EXPORT_SYMBOL(dsp_audio_s16_to_law);
30/* alaw -> ulaw */ 30/* alaw -> ulaw */
31u8 dsp_audio_alaw_to_ulaw[256]; 31u8 dsp_audio_alaw_to_ulaw[256];
32/* ulaw -> alaw */ 32/* ulaw -> alaw */
33u8 dsp_audio_ulaw_to_alaw[256]; 33static u8 dsp_audio_ulaw_to_alaw[256];
34u8 dsp_silence; 34u8 dsp_silence;
35 35
36 36
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
index c2f51cc50760..e868c47991bb 100644
--- a/drivers/isdn/mISDN/dsp_cmx.c
+++ b/drivers/isdn/mISDN/dsp_cmx.c
@@ -1540,11 +1540,11 @@ send_packet:
1540 schedule_work(&dsp->workq); 1540 schedule_work(&dsp->workq);
1541} 1541}
1542 1542
1543u32 samplecount; 1543static u32 samplecount;
1544struct timer_list dsp_spl_tl; 1544struct timer_list dsp_spl_tl;
1545u32 dsp_spl_jiffies; /* calculate the next time to fire */ 1545u32 dsp_spl_jiffies; /* calculate the next time to fire */
1546u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */ 1546static u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */
1547struct timeval dsp_start_tv; /* time at start of calculation */ 1547static struct timeval dsp_start_tv; /* time at start of calculation */
1548 1548
1549void 1549void
1550dsp_cmx_send(void *arg) 1550dsp_cmx_send(void *arg)
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index 2f10ed82c0db..41af06350ee5 100644
--- a/drivers/isdn/mISDN/dsp_core.c
+++ b/drivers/isdn/mISDN/dsp_core.c
@@ -161,7 +161,7 @@
161#include "core.h" 161#include "core.h"
162#include "dsp.h" 162#include "dsp.h"
163 163
164const char *mISDN_dsp_revision = "2.0"; 164static const char *mISDN_dsp_revision = "2.0";
165 165
166static int debug; 166static int debug;
167static int options; 167static int options;
diff --git a/drivers/isdn/mISDN/dsp_tones.c b/drivers/isdn/mISDN/dsp_tones.c
index de4d0c9ac483..7a9af66f4b19 100644
--- a/drivers/isdn/mISDN/dsp_tones.c
+++ b/drivers/isdn/mISDN/dsp_tones.c
@@ -231,7 +231,7 @@ dsp_audio_generate_ulaw_samples(void)
231 * tone sequence definition * 231 * tone sequence definition *
232 ****************************/ 232 ****************************/
233 233
234struct pattern { 234static struct pattern {
235 int tone; 235 int tone;
236 u8 *data[10]; 236 u8 *data[10];
237 u32 *siz[10]; 237 u32 *siz[10];
diff --git a/drivers/isdn/mISDN/l1oip_codec.c b/drivers/isdn/mISDN/l1oip_codec.c
index a2dc4570ef43..2ec4b28d9edc 100644
--- a/drivers/isdn/mISDN/l1oip_codec.c
+++ b/drivers/isdn/mISDN/l1oip_codec.c
@@ -49,6 +49,7 @@ NOTE: The bytes are handled as they are law-encoded.
49#include <linux/vmalloc.h> 49#include <linux/vmalloc.h>
50#include <linux/mISDNif.h> 50#include <linux/mISDNif.h>
51#include "core.h" 51#include "core.h"
52#include "l1oip.h"
52 53
53/* definitions of codec. don't use calculations, code may run slower. */ 54/* definitions of codec. don't use calculations, code may run slower. */
54 55
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c
index 4a55d6394e42..b73e952d12cf 100644
--- a/drivers/isdn/mISDN/layer1.c
+++ b/drivers/isdn/mISDN/layer1.c
@@ -18,6 +18,7 @@
18 18
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/mISDNhw.h> 20#include <linux/mISDNhw.h>
21#include "core.h"
21#include "layer1.h" 22#include "layer1.h"
22#include "fsm.h" 23#include "fsm.h"
23 24
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index 77fca3b061de..d6e2863f224a 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -15,6 +15,8 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/mISDNif.h>
19#include "core.h"
18#include "fsm.h" 20#include "fsm.h"
19#include "layer2.h" 21#include "layer2.h"
20 22
@@ -465,7 +467,7 @@ IsRNR(u_char *data, struct layer2 *l2)
465 data[0] == RNR : (data[0] & 0xf) == RNR; 467 data[0] == RNR : (data[0] & 0xf) == RNR;
466} 468}
467 469
468int 470static int
469iframe_error(struct layer2 *l2, struct sk_buff *skb) 471iframe_error(struct layer2 *l2, struct sk_buff *skb)
470{ 472{
471 u_int i; 473 u_int i;
@@ -483,7 +485,7 @@ iframe_error(struct layer2 *l2, struct sk_buff *skb)
483 return 0; 485 return 0;
484} 486}
485 487
486int 488static int
487super_error(struct layer2 *l2, struct sk_buff *skb) 489super_error(struct layer2 *l2, struct sk_buff *skb)
488{ 490{
489 if (skb->len != l2addrsize(l2) + 491 if (skb->len != l2addrsize(l2) +
@@ -492,7 +494,7 @@ super_error(struct layer2 *l2, struct sk_buff *skb)
492 return 0; 494 return 0;
493} 495}
494 496
495int 497static int
496unnum_error(struct layer2 *l2, struct sk_buff *skb, int wantrsp) 498unnum_error(struct layer2 *l2, struct sk_buff *skb, int wantrsp)
497{ 499{
498 int rsp = (*skb->data & 0x2) >> 1; 500 int rsp = (*skb->data & 0x2) >> 1;
@@ -505,7 +507,7 @@ unnum_error(struct layer2 *l2, struct sk_buff *skb, int wantrsp)
505 return 0; 507 return 0;
506} 508}
507 509
508int 510static int
509UI_error(struct layer2 *l2, struct sk_buff *skb) 511UI_error(struct layer2 *l2, struct sk_buff *skb)
510{ 512{
511 int rsp = *skb->data & 0x2; 513 int rsp = *skb->data & 0x2;
@@ -518,7 +520,7 @@ UI_error(struct layer2 *l2, struct sk_buff *skb)
518 return 0; 520 return 0;
519} 521}
520 522
521int 523static int
522FRMR_error(struct layer2 *l2, struct sk_buff *skb) 524FRMR_error(struct layer2 *l2, struct sk_buff *skb)
523{ 525{
524 u_int headers = l2addrsize(l2) + 1; 526 u_int headers = l2addrsize(l2) + 1;
@@ -1065,7 +1067,7 @@ l2_st6_dm_release(struct FsmInst *fi, int event, void *arg)
1065 } 1067 }
1066} 1068}
1067 1069
1068void 1070static void
1069enquiry_cr(struct layer2 *l2, u_char typ, u_char cr, u_char pf) 1071enquiry_cr(struct layer2 *l2, u_char typ, u_char cr, u_char pf)
1070{ 1072{
1071 struct sk_buff *skb; 1073 struct sk_buff *skb;
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c
index 54cfddcc4784..d55b14ae4e99 100644
--- a/drivers/isdn/mISDN/stack.c
+++ b/drivers/isdn/mISDN/stack.c
@@ -36,7 +36,7 @@ _queue_message(struct mISDNstack *st, struct sk_buff *skb)
36 } 36 }
37} 37}
38 38
39int 39static int
40mISDN_queue_message(struct mISDNchannel *ch, struct sk_buff *skb) 40mISDN_queue_message(struct mISDNchannel *ch, struct sk_buff *skb)
41{ 41{
42 _queue_message(ch->st, skb); 42 _queue_message(ch->st, skb);
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index 6fbae42127bf..1a824e75f8fd 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -393,7 +393,7 @@ dl_unit_data(struct manager *mgr, struct sk_buff *skb)
393 return 0; 393 return 0;
394} 394}
395 395
396unsigned int 396static unsigned int
397random_ri(void) 397random_ri(void)
398{ 398{
399 u16 x; 399 u16 x;
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c
index a8d1d9fb89e2..62b5e49684e5 100644
--- a/drivers/isdn/mISDN/timerdev.c
+++ b/drivers/isdn/mISDN/timerdev.c
@@ -23,6 +23,7 @@
23#include <linux/miscdevice.h> 23#include <linux/miscdevice.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/mISDNif.h> 25#include <linux/mISDNif.h>
26#include "core.h"
26 27
27static u_int *debug; 28static u_int *debug;
28 29