diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-02-12 03:53:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:34 -0500 |
commit | fc238b3791447b93c69cd50a99dfcaad6162afba (patch) | |
tree | ff98e02c355cfdf0f496e17cfaf81daf5f915270 /drivers/isdn | |
parent | b19a8f0472cf2fc401c47f585fcd42e770124e06 (diff) |
[PATCH] drivers/isdn/sc/: proper prototypes
Add proper prototypes in a header file for global code under
drivers/isdn/sc/.
Since the GNU C compiler is now able do tell us that caller and callee
disagreed about the number of arguments of setup_buffers(), this patch
also fixes this bug.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/sc/card.h | 30 | ||||
-rw-r--r-- | drivers/isdn/sc/command.c | 17 | ||||
-rw-r--r-- | drivers/isdn/sc/event.c | 3 | ||||
-rw-r--r-- | drivers/isdn/sc/init.c | 6 | ||||
-rw-r--r-- | drivers/isdn/sc/interrupt.c | 10 | ||||
-rw-r--r-- | drivers/isdn/sc/ioctl.c | 10 | ||||
-rw-r--r-- | drivers/isdn/sc/message.c | 10 | ||||
-rw-r--r-- | drivers/isdn/sc/packet.c | 10 | ||||
-rw-r--r-- | drivers/isdn/sc/scioc.h | 6 | ||||
-rw-r--r-- | drivers/isdn/sc/shmem.c | 6 | ||||
-rw-r--r-- | drivers/isdn/sc/timer.c | 8 |
11 files changed, 38 insertions, 78 deletions
diff --git a/drivers/isdn/sc/card.h b/drivers/isdn/sc/card.h index 8e44928cdf1c..4fbfa825c3a2 100644 --- a/drivers/isdn/sc/card.h +++ b/drivers/isdn/sc/card.h | |||
@@ -26,7 +26,9 @@ | |||
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
28 | #include <linux/isdnif.h> | 28 | #include <linux/isdnif.h> |
29 | #include <linux/irqreturn.h> | ||
29 | #include "message.h" | 30 | #include "message.h" |
31 | #include "scioc.h" | ||
30 | 32 | ||
31 | /* | 33 | /* |
32 | * Amount of time to wait for a reset to complete | 34 | * Amount of time to wait for a reset to complete |
@@ -98,4 +100,32 @@ typedef struct { | |||
98 | spinlock_t lock; /* local lock */ | 100 | spinlock_t lock; /* local lock */ |
99 | } board; | 101 | } board; |
100 | 102 | ||
103 | |||
104 | extern board *sc_adapter[]; | ||
105 | extern int cinst; | ||
106 | |||
107 | void memcpy_toshmem(int card, void *dest, const void *src, size_t n); | ||
108 | void memcpy_fromshmem(int card, void *dest, const void *src, size_t n); | ||
109 | int get_card_from_id(int driver); | ||
110 | int indicate_status(int card, int event, ulong Channel, char *Data); | ||
111 | irqreturn_t interrupt_handler(int interrupt, void *cardptr); | ||
112 | int sndpkt(int devId, int channel, struct sk_buff *data); | ||
113 | void rcvpkt(int card, RspMessage *rcvmsg); | ||
114 | int command(isdn_ctrl *cmd); | ||
115 | int reset(int card); | ||
116 | int startproc(int card); | ||
117 | int send_and_receive(int card, unsigned int procid, unsigned char type, | ||
118 | unsigned char class, unsigned char code, | ||
119 | unsigned char link, unsigned char data_len, | ||
120 | unsigned char *data, RspMessage *mesgdata, int timeout); | ||
121 | void flushreadfifo (int card); | ||
122 | int sendmessage(int card, unsigned int procid, unsigned int type, | ||
123 | unsigned int class, unsigned int code, unsigned int link, | ||
124 | unsigned int data_len, unsigned int *data); | ||
125 | int receivemessage(int card, RspMessage *rspmsg); | ||
126 | int sc_ioctl(int card, scs_ioctl *data); | ||
127 | int setup_buffers(int card, int c); | ||
128 | void check_reset(unsigned long data); | ||
129 | void check_phystat(unsigned long data); | ||
130 | |||
101 | #endif /* CARD_H */ | 131 | #endif /* CARD_H */ |
diff --git a/drivers/isdn/sc/command.c b/drivers/isdn/sc/command.c index 04b8a58f03b5..b7bb7cbcf503 100644 --- a/drivers/isdn/sc/command.c +++ b/drivers/isdn/sc/command.c | |||
@@ -31,19 +31,6 @@ static int setl2(int card, unsigned long arg); | |||
31 | static int setl3(int card, unsigned long arg); | 31 | static int setl3(int card, unsigned long arg); |
32 | static int acceptb(int card, unsigned long channel); | 32 | static int acceptb(int card, unsigned long channel); |
33 | 33 | ||
34 | extern int cinst; | ||
35 | extern board *sc_adapter[]; | ||
36 | |||
37 | extern int sc_ioctl(int, scs_ioctl *); | ||
38 | extern int setup_buffers(int, int, unsigned int); | ||
39 | extern int indicate_status(int, int,ulong,char*); | ||
40 | extern void check_reset(unsigned long); | ||
41 | extern int send_and_receive(int, unsigned int, unsigned char, unsigned char, | ||
42 | unsigned char, unsigned char, unsigned char, unsigned char *, | ||
43 | RspMessage *, int); | ||
44 | extern int sendmessage(int, unsigned int, unsigned int, unsigned int, | ||
45 | unsigned int, unsigned int, unsigned int, unsigned int *); | ||
46 | |||
47 | #ifdef DEBUG | 34 | #ifdef DEBUG |
48 | /* | 35 | /* |
49 | * Translate command codes to strings | 36 | * Translate command codes to strings |
@@ -208,7 +195,7 @@ static int answer(int card, unsigned long channel) | |||
208 | return -ENODEV; | 195 | return -ENODEV; |
209 | } | 196 | } |
210 | 197 | ||
211 | if(setup_buffers(card, channel+1, BUFFER_SIZE)) { | 198 | if(setup_buffers(card, channel+1)) { |
212 | hangup(card, channel+1); | 199 | hangup(card, channel+1); |
213 | return -ENOBUFS; | 200 | return -ENOBUFS; |
214 | } | 201 | } |
@@ -297,7 +284,7 @@ static int acceptb(int card, unsigned long channel) | |||
297 | return -ENODEV; | 284 | return -ENODEV; |
298 | } | 285 | } |
299 | 286 | ||
300 | if(setup_buffers(card, channel+1, BUFFER_SIZE)) | 287 | if(setup_buffers(card, channel+1)) |
301 | { | 288 | { |
302 | hangup(card, channel+1); | 289 | hangup(card, channel+1); |
303 | return -ENOBUFS; | 290 | return -ENOBUFS; |
diff --git a/drivers/isdn/sc/event.c b/drivers/isdn/sc/event.c index 57367325ef04..498f4039ece2 100644 --- a/drivers/isdn/sc/event.c +++ b/drivers/isdn/sc/event.c | |||
@@ -20,9 +20,6 @@ | |||
20 | #include "message.h" | 20 | #include "message.h" |
21 | #include "card.h" | 21 | #include "card.h" |
22 | 22 | ||
23 | extern int cinst; | ||
24 | extern board *sc_adapter[]; | ||
25 | |||
26 | #ifdef DEBUG | 23 | #ifdef DEBUG |
27 | static char *events[] = { "ISDN_STAT_STAVAIL", | 24 | static char *events[] = { "ISDN_STAT_STAVAIL", |
28 | "ISDN_STAT_ICALL", | 25 | "ISDN_STAT_ICALL", |
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c index 150759a5cddf..0bf76344a0d5 100644 --- a/drivers/isdn/sc/init.c +++ b/drivers/isdn/sc/init.c | |||
@@ -35,12 +35,6 @@ module_param_array(irq, int, NULL, 0); | |||
35 | module_param_array(ram, int, NULL, 0); | 35 | module_param_array(ram, int, NULL, 0); |
36 | module_param(do_reset, bool, 0); | 36 | module_param(do_reset, bool, 0); |
37 | 37 | ||
38 | extern irqreturn_t interrupt_handler(int, void *); | ||
39 | extern int sndpkt(int, int, int, struct sk_buff *); | ||
40 | extern int command(isdn_ctrl *); | ||
41 | extern int indicate_status(int, int, ulong, char*); | ||
42 | extern int reset(int); | ||
43 | |||
44 | static int identify_board(unsigned long, unsigned int); | 38 | static int identify_board(unsigned long, unsigned int); |
45 | 39 | ||
46 | static int __init sc_init(void) | 40 | static int __init sc_init(void) |
diff --git a/drivers/isdn/sc/interrupt.c b/drivers/isdn/sc/interrupt.c index cd17de18cb76..bef7963cdd02 100644 --- a/drivers/isdn/sc/interrupt.c +++ b/drivers/isdn/sc/interrupt.c | |||
@@ -21,16 +21,6 @@ | |||
21 | #include "card.h" | 21 | #include "card.h" |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | 23 | ||
24 | extern int indicate_status(int, int, ulong, char *); | ||
25 | extern void check_phystat(unsigned long); | ||
26 | extern int receivemessage(int, RspMessage *); | ||
27 | extern int sendmessage(int, unsigned int, unsigned int, unsigned int, | ||
28 | unsigned int, unsigned int, unsigned int, unsigned int *); | ||
29 | extern void rcvpkt(int, RspMessage *); | ||
30 | |||
31 | extern int cinst; | ||
32 | extern board *sc_adapter[]; | ||
33 | |||
34 | static int get_card_from_irq(int irq) | 24 | static int get_card_from_irq(int irq) |
35 | { | 25 | { |
36 | int i; | 26 | int i; |
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index 57c4ab96d136..7817d2244921 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c | |||
@@ -12,16 +12,6 @@ | |||
12 | #include "card.h" | 12 | #include "card.h" |
13 | #include "scioc.h" | 13 | #include "scioc.h" |
14 | 14 | ||
15 | extern int indicate_status(int, int, unsigned long, char *); | ||
16 | extern int startproc(int); | ||
17 | extern int reset(int); | ||
18 | extern int send_and_receive(int, unsigned int, unsigned char,unsigned char, | ||
19 | unsigned char,unsigned char, | ||
20 | unsigned char, unsigned char *, RspMessage *, int); | ||
21 | |||
22 | extern board *sc_adapter[]; | ||
23 | |||
24 | |||
25 | static int GetStatus(int card, boardInfo *); | 15 | static int GetStatus(int card, boardInfo *); |
26 | 16 | ||
27 | /* | 17 | /* |
diff --git a/drivers/isdn/sc/message.c b/drivers/isdn/sc/message.c index 0a0fe6b8039b..c5a307e3c496 100644 --- a/drivers/isdn/sc/message.c +++ b/drivers/isdn/sc/message.c | |||
@@ -22,16 +22,6 @@ | |||
22 | #include "message.h" | 22 | #include "message.h" |
23 | #include "card.h" | 23 | #include "card.h" |
24 | 24 | ||
25 | extern board *sc_adapter[]; | ||
26 | extern unsigned int cinst; | ||
27 | |||
28 | /* | ||
29 | * Obligatory function prototypes | ||
30 | */ | ||
31 | extern int indicate_status(int,ulong,char*); | ||
32 | extern int scm_command(isdn_ctrl *); | ||
33 | |||
34 | |||
35 | /* | 25 | /* |
36 | * receive a message from the board | 26 | * receive a message from the board |
37 | */ | 27 | */ |
diff --git a/drivers/isdn/sc/packet.c b/drivers/isdn/sc/packet.c index 1e04676b016b..92016a2608e9 100644 --- a/drivers/isdn/sc/packet.c +++ b/drivers/isdn/sc/packet.c | |||
@@ -20,16 +20,6 @@ | |||
20 | #include "message.h" | 20 | #include "message.h" |
21 | #include "card.h" | 21 | #include "card.h" |
22 | 22 | ||
23 | extern board *sc_adapter[]; | ||
24 | extern unsigned int cinst; | ||
25 | |||
26 | extern int get_card_from_id(int); | ||
27 | extern int indicate_status(int, int,ulong, char*); | ||
28 | extern void memcpy_toshmem(int, void *, const void *, size_t); | ||
29 | extern void memcpy_fromshmem(int, void *, const void *, size_t); | ||
30 | extern int sendmessage(int, unsigned int, unsigned int, unsigned int, | ||
31 | unsigned int, unsigned int, unsigned int, unsigned int *); | ||
32 | |||
33 | int sndpkt(int devId, int channel, struct sk_buff *data) | 23 | int sndpkt(int devId, int channel, struct sk_buff *data) |
34 | { | 24 | { |
35 | LLData ReqLnkWrite; | 25 | LLData ReqLnkWrite; |
diff --git a/drivers/isdn/sc/scioc.h b/drivers/isdn/sc/scioc.h index d08e650c7b6a..dfb107a6de44 100644 --- a/drivers/isdn/sc/scioc.h +++ b/drivers/isdn/sc/scioc.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef __ISDN_SC_SCIOC_H__ | ||
2 | #define __ISDN_SC_SCIOC_H__ | ||
3 | |||
1 | /* | 4 | /* |
2 | * This software may be used and distributed according to the terms | 5 | * This software may be used and distributed according to the terms |
3 | * of the GNU General Public License, incorporated herein by reference. | 6 | * of the GNU General Public License, incorporated herein by reference. |
@@ -103,3 +106,6 @@ typedef struct { | |||
103 | POTInfo potsinfo; | 106 | POTInfo potsinfo; |
104 | } info; | 107 | } info; |
105 | } boardInfo; | 108 | } boardInfo; |
109 | |||
110 | #endif /* __ISDN_SC_SCIOC_H__ */ | ||
111 | |||
diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index 6f58862992db..034d41a61ae1 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c | |||
@@ -22,12 +22,6 @@ | |||
22 | #include "card.h" | 22 | #include "card.h" |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * Main adapter array | ||
26 | */ | ||
27 | extern board *sc_adapter[]; | ||
28 | extern int cinst; | ||
29 | |||
30 | /* | ||
31 | * | 25 | * |
32 | */ | 26 | */ |
33 | void memcpy_toshmem(int card, void *dest, const void *src, size_t n) | 27 | void memcpy_toshmem(int card, void *dest, const void *src, size_t n) |
diff --git a/drivers/isdn/sc/timer.c b/drivers/isdn/sc/timer.c index f43282be0ada..cc1b8861be2a 100644 --- a/drivers/isdn/sc/timer.c +++ b/drivers/isdn/sc/timer.c | |||
@@ -20,14 +20,6 @@ | |||
20 | #include "message.h" | 20 | #include "message.h" |
21 | #include "card.h" | 21 | #include "card.h" |
22 | 22 | ||
23 | extern board *sc_adapter[]; | ||
24 | |||
25 | extern void flushreadfifo(int); | ||
26 | extern int startproc(int); | ||
27 | extern int indicate_status(int, int, unsigned long, char *); | ||
28 | extern int sendmessage(int, unsigned int, unsigned int, unsigned int, | ||
29 | unsigned int, unsigned int, unsigned int, unsigned int *); | ||
30 | |||
31 | 23 | ||
32 | /* | 24 | /* |
33 | * Write the proper values into the I/O ports following a reset | 25 | * Write the proper values into the I/O ports following a reset |