Commit c721bccece2b3abca4f7b0b95108e68b78445cec
Committed by
Linus Torvalds
1 parent
5b7b18ccde
Exists in
master
and in
39 other branches
[PATCH] hysdn: remove custom types
hysdn defines its own types: ulong, uint, uchar and word. Problem is, the module_param macros rely upon some of those identifiers having special meanings too. The net effect is that module_param() and friends cannot be used in ISDN because of this namespace clash. So remove the hysdn-private defines and open-code them all. Cc: Karsten Keil <kkeil@suse.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 12 changed files with 127 additions and 126 deletions Side-by-side Diff
- drivers/isdn/hysdn/boardergo.c
- drivers/isdn/hysdn/boardergo.h
- drivers/isdn/hysdn/hycapi.c
- drivers/isdn/hysdn/hysdn_boot.c
- drivers/isdn/hysdn/hysdn_defs.h
- drivers/isdn/hysdn/hysdn_init.c
- drivers/isdn/hysdn/hysdn_net.c
- drivers/isdn/hysdn/hysdn_pof.h
- drivers/isdn/hysdn/hysdn_procconf.c
- drivers/isdn/hysdn/hysdn_proclog.c
- drivers/isdn/hysdn/hysdn_sched.c
- drivers/isdn/hysdn/ince1pc.h
drivers/isdn/hysdn/boardergo.c
... | ... | @@ -38,8 +38,8 @@ |
38 | 38 | { |
39 | 39 | hysdn_card *card = dev_id; /* parameter from irq */ |
40 | 40 | tErgDpram *dpr; |
41 | - ulong flags; | |
42 | - uchar volatile b; | |
41 | + unsigned long flags; | |
42 | + unsigned char volatile b; | |
43 | 43 | |
44 | 44 | if (!card) |
45 | 45 | return IRQ_NONE; /* error -> spurious interrupt */ |
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | { |
78 | 78 | tErgDpram *dpr; |
79 | 79 | int again; |
80 | - ulong flags; | |
80 | + unsigned long flags; | |
81 | 81 | |
82 | 82 | if (card->state != CARD_STATE_RUN) |
83 | 83 | return; /* invalid call */ |
... | ... | @@ -131,8 +131,8 @@ |
131 | 131 | static void |
132 | 132 | ergo_stopcard(hysdn_card * card) |
133 | 133 | { |
134 | - ulong flags; | |
135 | - uchar val; | |
134 | + unsigned long flags; | |
135 | + unsigned char val; | |
136 | 136 | |
137 | 137 | hysdn_net_release(card); /* first release the net device if existing */ |
138 | 138 | #ifdef CONFIG_HYSDN_CAPI |
... | ... | @@ -157,7 +157,7 @@ |
157 | 157 | static void |
158 | 158 | ergo_set_errlog_state(hysdn_card * card, int on) |
159 | 159 | { |
160 | - ulong flags; | |
160 | + unsigned long flags; | |
161 | 161 | |
162 | 162 | if (card->state != CARD_STATE_RUN) { |
163 | 163 | card->err_log_state = ERRLOG_STATE_OFF; /* must be off */ |
164 | 164 | |
... | ... | @@ -217,9 +217,10 @@ |
217 | 217 | /* Negative return values are interpreted as errors. */ |
218 | 218 | /*****************************************************************************/ |
219 | 219 | static int |
220 | -ergo_writebootimg(struct HYSDN_CARD *card, uchar * buf, ulong offs) | |
220 | +ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf, | |
221 | + unsigned long offs) | |
221 | 222 | { |
222 | - uchar *dst; | |
223 | + unsigned char *dst; | |
223 | 224 | tErgDpram *dpram; |
224 | 225 | int cnt = (BOOT_IMG_SIZE >> 2); /* number of words to move and swap (byte order!) */ |
225 | 226 | |
226 | 227 | |
227 | 228 | |
... | ... | @@ -264,14 +265,14 @@ |
264 | 265 | /* case of errors a negative error value is returned. */ |
265 | 266 | /********************************************************************************/ |
266 | 267 | static int |
267 | -ergo_writebootseq(struct HYSDN_CARD *card, uchar * buf, int len) | |
268 | +ergo_writebootseq(struct HYSDN_CARD *card, unsigned char *buf, int len) | |
268 | 269 | { |
269 | 270 | tDpramBootSpooler *sp = (tDpramBootSpooler *) card->dpram; |
270 | - uchar *dst; | |
271 | - uchar buflen; | |
271 | + unsigned char *dst; | |
272 | + unsigned char buflen; | |
272 | 273 | int nr_write; |
273 | - uchar tmp_rdptr; | |
274 | - uchar wr_mirror; | |
274 | + unsigned char tmp_rdptr; | |
275 | + unsigned char wr_mirror; | |
275 | 276 | int i; |
276 | 277 | |
277 | 278 | if (card->debug_flags & LOG_POF_CARD) |
... | ... | @@ -330,7 +331,7 @@ |
330 | 331 | { |
331 | 332 | tErgDpram *dpr = card->dpram; /* pointer to DPRAM structure */ |
332 | 333 | int timecnt = 10000 / 50; /* timeout is 10 secs max. */ |
333 | - ulong flags; | |
334 | + unsigned long flags; | |
334 | 335 | int msg_size; |
335 | 336 | int i; |
336 | 337 | |
... | ... | @@ -345,7 +346,7 @@ |
345 | 346 | if ((dpr->ToPcChannel != CHAN_SYSTEM) || |
346 | 347 | (dpr->ToPcSize < MIN_RDY_MSG_SIZE) || |
347 | 348 | (dpr->ToPcSize > MAX_RDY_MSG_SIZE) || |
348 | - ((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC)) | |
349 | + ((*(unsigned long *) dpr->ToPcBuf) != RDY_MAGIC)) | |
349 | 350 | break; /* an error occurred */ |
350 | 351 | |
351 | 352 | /* Check for additional data delivered during SysReady */ |
drivers/isdn/hysdn/boardergo.h
... | ... | @@ -23,36 +23,36 @@ |
23 | 23 | |
24 | 24 | /* following DPRAM layout copied from OS2-driver boarderg.h */ |
25 | 25 | typedef struct ErgDpram_tag { |
26 | -/*0000 */ uchar ToHyBuf[ERG_TO_HY_BUF_SIZE]; | |
27 | -/*0E00 */ uchar ToPcBuf[ERG_TO_PC_BUF_SIZE]; | |
26 | +/*0000 */ unsigned char ToHyBuf[ERG_TO_HY_BUF_SIZE]; | |
27 | +/*0E00 */ unsigned char ToPcBuf[ERG_TO_PC_BUF_SIZE]; | |
28 | 28 | |
29 | - /*1C00 */ uchar bSoftUart[SIZE_RSV_SOFT_UART]; | |
29 | + /*1C00 */ unsigned char bSoftUart[SIZE_RSV_SOFT_UART]; | |
30 | 30 | /* size 0x1B0 */ |
31 | 31 | |
32 | - /*1DB0 *//* tErrLogEntry */ uchar volatile ErrLogMsg[64]; | |
32 | + /*1DB0 *//* tErrLogEntry */ unsigned char volatile ErrLogMsg[64]; | |
33 | 33 | /* size 64 bytes */ |
34 | - /*1DB0 ulong ulErrType; */ | |
35 | - /*1DB4 ulong ulErrSubtype; */ | |
36 | - /*1DB8 ulong ucTextSize; */ | |
37 | - /*1DB9 ulong ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */ | |
34 | + /*1DB0 unsigned long ulErrType; */ | |
35 | + /*1DB4 unsigned long ulErrSubtype; */ | |
36 | + /*1DB8 unsigned long ucTextSize; */ | |
37 | + /*1DB9 unsigned long ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */ | |
38 | 38 | /*1DF0 */ |
39 | 39 | |
40 | -/*1DF0 */ word volatile ToHyChannel; | |
41 | -/*1DF2 */ word volatile ToHySize; | |
42 | - /*1DF4 */ uchar volatile ToHyFlag; | |
40 | +/*1DF0 */ unsigned short volatile ToHyChannel; | |
41 | +/*1DF2 */ unsigned short volatile ToHySize; | |
42 | + /*1DF4 */ unsigned char volatile ToHyFlag; | |
43 | 43 | /* !=0: msg for Hy waiting */ |
44 | - /*1DF5 */ uchar volatile ToPcFlag; | |
44 | + /*1DF5 */ unsigned char volatile ToPcFlag; | |
45 | 45 | /* !=0: msg for PC waiting */ |
46 | -/*1DF6 */ word volatile ToPcChannel; | |
47 | -/*1DF8 */ word volatile ToPcSize; | |
48 | - /*1DFA */ uchar bRes1DBA[0x1E00 - 0x1DFA]; | |
46 | +/*1DF6 */ unsigned short volatile ToPcChannel; | |
47 | +/*1DF8 */ unsigned short volatile ToPcSize; | |
48 | + /*1DFA */ unsigned char bRes1DBA[0x1E00 - 0x1DFA]; | |
49 | 49 | /* 6 bytes */ |
50 | 50 | |
51 | -/*1E00 */ uchar bRestOfEntryTbl[0x1F00 - 0x1E00]; | |
52 | -/*1F00 */ ulong TrapTable[62]; | |
53 | - /*1FF8 */ uchar bRes1FF8[0x1FFB - 0x1FF8]; | |
51 | +/*1E00 */ unsigned char bRestOfEntryTbl[0x1F00 - 0x1E00]; | |
52 | +/*1F00 */ unsigned long TrapTable[62]; | |
53 | + /*1FF8 */ unsigned char bRes1FF8[0x1FFB - 0x1FF8]; | |
54 | 54 | /* low part of reset vetor */ |
55 | -/*1FFB */ uchar ToPcIntMetro; | |
55 | +/*1FFB */ unsigned char ToPcIntMetro; | |
56 | 56 | /* notes: |
57 | 57 | * - metro has 32-bit boot ram - accessing |
58 | 58 | * ToPcInt and ToHyInt would be the same; |
59 | 59 | |
60 | 60 | |
... | ... | @@ -65,16 +65,16 @@ |
65 | 65 | * so E1 side should NOT change this byte |
66 | 66 | * when writing! |
67 | 67 | */ |
68 | -/*1FFC */ uchar volatile ToHyNoDpramErrLog; | |
68 | +/*1FFC */ unsigned char volatile ToHyNoDpramErrLog; | |
69 | 69 | /* note: ToHyNoDpramErrLog is used to inform |
70 | 70 | * boot loader, not to use DPRAM based |
71 | 71 | * ErrLog; when DOS driver is rewritten |
72 | 72 | * this becomes obsolete |
73 | 73 | */ |
74 | -/*1FFD */ uchar bRes1FFD; | |
75 | - /*1FFE */ uchar ToPcInt; | |
74 | +/*1FFD */ unsigned char bRes1FFD; | |
75 | + /*1FFE */ unsigned char ToPcInt; | |
76 | 76 | /* E1_intclear; on CHAMP2: E1_intset */ |
77 | - /*1FFF */ uchar ToHyInt; | |
77 | + /*1FFF */ unsigned char ToHyInt; | |
78 | 78 | /* E1_intset; on CHAMP2: E1_intclear */ |
79 | 79 | } tErgDpram; |
80 | 80 |
drivers/isdn/hysdn/hycapi.c
... | ... | @@ -523,7 +523,7 @@ |
523 | 523 | *******************************************************************/ |
524 | 524 | |
525 | 525 | void |
526 | -hycapi_rx_capipkt(hysdn_card * card, uchar * buf, word len) | |
526 | +hycapi_rx_capipkt(hysdn_card * card, unsigned char *buf, unsigned short len) | |
527 | 527 | { |
528 | 528 | struct sk_buff *skb; |
529 | 529 | hycapictrl_info *cinfo = card->hyctrlinfo; |
drivers/isdn/hysdn/hysdn_boot.c
... | ... | @@ -30,17 +30,17 @@ |
30 | 30 | /* needed during boot and so allocated dynamically. */ |
31 | 31 | /************************************************************/ |
32 | 32 | struct boot_data { |
33 | - word Cryptor; /* for use with Decrypt function */ | |
34 | - word Nrecs; /* records remaining in file */ | |
35 | - uchar pof_state; /* actual state of read handler */ | |
36 | - uchar is_crypted; /* card data is crypted */ | |
33 | + unsigned short Cryptor; /* for use with Decrypt function */ | |
34 | + unsigned short Nrecs; /* records remaining in file */ | |
35 | + unsigned char pof_state;/* actual state of read handler */ | |
36 | + unsigned char is_crypted;/* card data is crypted */ | |
37 | 37 | int BufSize; /* actual number of bytes bufferd */ |
38 | 38 | int last_error; /* last occurred error */ |
39 | - word pof_recid; /* actual pof recid */ | |
40 | - ulong pof_reclen; /* total length of pof record data */ | |
41 | - ulong pof_recoffset; /* actual offset inside pof record */ | |
39 | + unsigned short pof_recid;/* actual pof recid */ | |
40 | + unsigned long pof_reclen;/* total length of pof record data */ | |
41 | + unsigned long pof_recoffset;/* actual offset inside pof record */ | |
42 | 42 | union { |
43 | - uchar BootBuf[BOOT_BUF_SIZE]; /* buffer as byte count */ | |
43 | + unsigned char BootBuf[BOOT_BUF_SIZE];/* buffer as byte count */ | |
44 | 44 | tPofRecHdr PofRecHdr; /* header for actual record/chunk */ |
45 | 45 | tPofFileHdr PofFileHdr; /* header from POF file */ |
46 | 46 | tPofTimeStamp PofTime; /* time information */ |
47 | 47 | |
... | ... | @@ -69,11 +69,11 @@ |
69 | 69 | static void |
70 | 70 | DecryptBuf(struct boot_data *boot, int cnt) |
71 | 71 | { |
72 | - uchar *bufp = boot->buf.BootBuf; | |
72 | + unsigned char *bufp = boot->buf.BootBuf; | |
73 | 73 | |
74 | 74 | while (cnt--) { |
75 | 75 | boot->Cryptor = (boot->Cryptor >> 1) ^ ((boot->Cryptor & 1U) ? CRYPT_FEEDTERM : 0); |
76 | - *bufp++ ^= (uchar) boot->Cryptor; | |
76 | + *bufp++ ^= (unsigned char)boot->Cryptor; | |
77 | 77 | } |
78 | 78 | } /* DecryptBuf */ |
79 | 79 | |
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | { |
87 | 87 | struct boot_data *boot = card->boot; /* pointer to boot specific data */ |
88 | 88 | long l; |
89 | - uchar *imgp; | |
89 | + unsigned char *imgp; | |
90 | 90 | int img_len; |
91 | 91 | |
92 | 92 | /* handle the different record types */ |
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | break; |
198 | 198 | } |
199 | 199 | /* Setup the new state and vars */ |
200 | - boot->Nrecs = (word) (boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */ | |
200 | + boot->Nrecs = (unsigned short)(boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */ | |
201 | 201 | boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */ |
202 | 202 | boot->last_error = sizeof(tPofRecHdr); /* new length */ |
203 | 203 | break; |
... | ... | @@ -268,7 +268,7 @@ |
268 | 268 | /* occurred. Additionally the pointer to the buffer data area is set on success */ |
269 | 269 | /*******************************************************************************/ |
270 | 270 | int |
271 | -pof_write_open(hysdn_card * card, uchar ** bufp) | |
271 | +pof_write_open(hysdn_card * card, unsigned char **bufp) | |
272 | 272 | { |
273 | 273 | struct boot_data *boot; /* pointer to boot specific data */ |
274 | 274 | |
... | ... | @@ -335,7 +335,7 @@ |
335 | 335 | /* when POF has been booted. A return value of 0 is used if no error occurred. */ |
336 | 336 | /*********************************************************************************/ |
337 | 337 | int |
338 | -EvalSysrTokData(hysdn_card * card, uchar * cp, int len) | |
338 | +EvalSysrTokData(hysdn_card *card, unsigned char *cp, int len) | |
339 | 339 | { |
340 | 340 | u_char *p; |
341 | 341 | u_char crc; |
drivers/isdn/hysdn/hysdn_defs.h
... | ... | @@ -20,14 +20,6 @@ |
20 | 20 | #include <linux/workqueue.h> |
21 | 21 | #include <linux/skbuff.h> |
22 | 22 | |
23 | -/****************************/ | |
24 | -/* storage type definitions */ | |
25 | -/****************************/ | |
26 | -#define uchar unsigned char | |
27 | -#define uint unsigned int | |
28 | -#define ulong unsigned long | |
29 | -#define word unsigned short | |
30 | - | |
31 | 23 | #include "ince1pc.h" |
32 | 24 | |
33 | 25 | #ifdef CONFIG_HYSDN_CAPI |
... | ... | @@ -147,18 +139,18 @@ |
147 | 139 | |
148 | 140 | /* general variables for the cards */ |
149 | 141 | int myid; /* own driver card id */ |
150 | - uchar bus; /* pci bus the card is connected to */ | |
151 | - uchar devfn; /* slot+function bit encoded */ | |
152 | - word subsysid; /* PCI subsystem id */ | |
153 | - uchar brdtype; /* type of card */ | |
154 | - uint bchans; /* number of available B-channels */ | |
155 | - uint faxchans; /* number of available fax-channels */ | |
156 | - uchar mac_addr[6]; /* MAC Address read from card */ | |
157 | - uint irq; /* interrupt number */ | |
158 | - uint iobase; /* IO-port base address */ | |
159 | - ulong plxbase; /* PLX memory base */ | |
160 | - ulong membase; /* DPRAM memory base */ | |
161 | - ulong memend; /* DPRAM memory end */ | |
142 | + unsigned char bus; /* pci bus the card is connected to */ | |
143 | + unsigned char devfn; /* slot+function bit encoded */ | |
144 | + unsigned short subsysid;/* PCI subsystem id */ | |
145 | + unsigned char brdtype; /* type of card */ | |
146 | + unsigned int bchans; /* number of available B-channels */ | |
147 | + unsigned int faxchans; /* number of available fax-channels */ | |
148 | + unsigned char mac_addr[6];/* MAC Address read from card */ | |
149 | + unsigned int irq; /* interrupt number */ | |
150 | + unsigned int iobase; /* IO-port base address */ | |
151 | + unsigned long plxbase; /* PLX memory base */ | |
152 | + unsigned long membase; /* DPRAM memory base */ | |
153 | + unsigned long memend; /* DPRAM memory end */ | |
162 | 154 | void *dpram; /* mapped dpram */ |
163 | 155 | int state; /* actual state of card -> CARD_STATE_** */ |
164 | 156 | struct HYSDN_CARD *next; /* pointer to next card */ |
165 | 157 | |
166 | 158 | |
167 | 159 | |
... | ... | @@ -168,26 +160,26 @@ |
168 | 160 | void *procconf; /* pointer to procconf filesystem specific data */ |
169 | 161 | |
170 | 162 | /* debugging and logging */ |
171 | - uchar err_log_state; /* actual error log state of the card */ | |
172 | - ulong debug_flags; /* tells what should be debugged and where */ | |
163 | + unsigned char err_log_state;/* actual error log state of the card */ | |
164 | + unsigned long debug_flags;/* tells what should be debugged and where */ | |
173 | 165 | void (*set_errlog_state) (struct HYSDN_CARD *, int); |
174 | 166 | |
175 | 167 | /* interrupt handler + interrupt synchronisation */ |
176 | 168 | struct work_struct irq_queue; /* interrupt task queue */ |
177 | - uchar volatile irq_enabled; /* interrupt enabled if != 0 */ | |
178 | - uchar volatile hw_lock; /* hardware is currently locked -> no access */ | |
169 | + unsigned char volatile irq_enabled;/* interrupt enabled if != 0 */ | |
170 | + unsigned char volatile hw_lock;/* hardware is currently locked -> no access */ | |
179 | 171 | |
180 | 172 | /* boot process */ |
181 | 173 | void *boot; /* pointer to boot private data */ |
182 | - int (*writebootimg) (struct HYSDN_CARD *, uchar *, ulong); | |
183 | - int (*writebootseq) (struct HYSDN_CARD *, uchar *, int); | |
174 | + int (*writebootimg) (struct HYSDN_CARD *, unsigned char *, unsigned long); | |
175 | + int (*writebootseq) (struct HYSDN_CARD *, unsigned char *, int); | |
184 | 176 | int (*waitpofready) (struct HYSDN_CARD *); |
185 | 177 | int (*testram) (struct HYSDN_CARD *); |
186 | 178 | |
187 | 179 | /* scheduler for data transfer (only async parts) */ |
188 | - uchar async_data[256]; /* async data to be sent (normally for config) */ | |
189 | - word volatile async_len; /* length of data to sent */ | |
190 | - word volatile async_channel; /* channel number for async transfer */ | |
180 | + unsigned char async_data[256];/* async data to be sent (normally for config) */ | |
181 | + unsigned short volatile async_len;/* length of data to sent */ | |
182 | + unsigned short volatile async_channel;/* channel number for async transfer */ | |
191 | 183 | int volatile async_busy; /* flag != 0 sending in progress */ |
192 | 184 | int volatile net_tx_busy; /* a network packet tx is in progress */ |
193 | 185 | |
194 | 186 | |
195 | 187 | |
... | ... | @@ -251,15 +243,18 @@ |
251 | 243 | |
252 | 244 | /* hysdn_boot.c */ |
253 | 245 | extern int pof_write_close(hysdn_card *); /* close proc file after writing pof */ |
254 | -extern int pof_write_open(hysdn_card *, uchar **); /* open proc file for writing pof */ | |
246 | +extern int pof_write_open(hysdn_card *, unsigned char **); /* open proc file for writing pof */ | |
255 | 247 | extern int pof_write_buffer(hysdn_card *, int); /* write boot data to card */ |
256 | -extern int EvalSysrTokData(hysdn_card *, uchar *, int); /* Check Sysready Token Data */ | |
248 | +extern int EvalSysrTokData(hysdn_card *, unsigned char *, int); /* Check Sysready Token Data */ | |
257 | 249 | |
258 | 250 | /* hysdn_sched.c */ |
259 | -extern int hysdn_sched_tx(hysdn_card *, uchar *, word volatile *, word volatile *, | |
260 | - word); | |
261 | -extern int hysdn_sched_rx(hysdn_card *, uchar *, word, word); | |
262 | -extern int hysdn_tx_cfgline(hysdn_card *, uchar *, word); /* send one cfg line */ | |
251 | +extern int hysdn_sched_tx(hysdn_card *, unsigned char *, | |
252 | + unsigned short volatile *, unsigned short volatile *, | |
253 | + unsigned short); | |
254 | +extern int hysdn_sched_rx(hysdn_card *, unsigned char *, unsigned short, | |
255 | + unsigned short); | |
256 | +extern int hysdn_tx_cfgline(hysdn_card *, unsigned char *, | |
257 | + unsigned short); /* send one cfg line */ | |
263 | 258 | |
264 | 259 | /* hysdn_net.c */ |
265 | 260 | extern unsigned int hynet_enable; |
266 | 261 | |
... | ... | @@ -269,14 +264,16 @@ |
269 | 264 | extern char *hysdn_net_getname(hysdn_card *); /* get name of net interface */ |
270 | 265 | extern void hysdn_tx_netack(hysdn_card *); /* acknowledge a packet tx */ |
271 | 266 | extern struct sk_buff *hysdn_tx_netget(hysdn_card *); /* get next network packet */ |
272 | -extern void hysdn_rx_netpkt(hysdn_card *, uchar *, word); /* rxed packet from network */ | |
267 | +extern void hysdn_rx_netpkt(hysdn_card *, unsigned char *, | |
268 | + unsigned short); /* rxed packet from network */ | |
273 | 269 | |
274 | 270 | #ifdef CONFIG_HYSDN_CAPI |
275 | 271 | extern unsigned int hycapi_enable; |
276 | 272 | extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */ |
277 | 273 | extern int hycapi_capi_release(hysdn_card *); /* delete the device */ |
278 | 274 | extern int hycapi_capi_stop(hysdn_card *card); /* suspend */ |
279 | -extern void hycapi_rx_capipkt(hysdn_card * card, uchar * buf, word len); | |
275 | +extern void hycapi_rx_capipkt(hysdn_card * card, unsigned char * buf, | |
276 | + unsigned short len); | |
280 | 277 | extern void hycapi_tx_capiack(hysdn_card * card); |
281 | 278 | extern struct sk_buff *hycapi_tx_capiget(hysdn_card *card); |
282 | 279 | extern int hycapi_init(void); |
drivers/isdn/hysdn/hysdn_init.c
... | ... | @@ -41,8 +41,8 @@ |
41 | 41 | /* the last entry contains all 0 */ |
42 | 42 | /**********************************************/ |
43 | 43 | static struct { |
44 | - word subid; /* PCI sub id */ | |
45 | - uchar cardtyp; /* card type assigned */ | |
44 | + unsigned short subid; /* PCI sub id */ | |
45 | + unsigned char cardtyp; /* card type assigned */ | |
46 | 46 | } pci_subid_map[] = { |
47 | 47 | |
48 | 48 | { |
drivers/isdn/hysdn/hysdn_net.c
... | ... | @@ -83,12 +83,12 @@ |
83 | 83 | |
84 | 84 | /* Fill in the MAC-level header (if not already set) */ |
85 | 85 | if (!card->mac_addr[0]) { |
86 | - for (i = 0; i < ETH_ALEN - sizeof(ulong); i++) | |
86 | + for (i = 0; i < ETH_ALEN - sizeof(unsigned long); i++) | |
87 | 87 | dev->dev_addr[i] = 0xfc; |
88 | 88 | if ((in_dev = dev->ip_ptr) != NULL) { |
89 | 89 | struct in_ifaddr *ifa = in_dev->ifa_list; |
90 | 90 | if (ifa != NULL) |
91 | - memcpy(dev->dev_addr + (ETH_ALEN - sizeof(ulong)), &ifa->ifa_local, sizeof(ulong)); | |
91 | + memcpy(dev->dev_addr + (ETH_ALEN - sizeof(unsigned long)), &ifa->ifa_local, sizeof(unsigned long)); | |
92 | 92 | } |
93 | 93 | } else |
94 | 94 | memcpy(dev->dev_addr, card->mac_addr, ETH_ALEN); |
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | /* we got a packet from the network, go and queue it */ |
198 | 198 | /*****************************************************/ |
199 | 199 | void |
200 | -hysdn_rx_netpkt(hysdn_card * card, uchar * buf, word len) | |
200 | +hysdn_rx_netpkt(hysdn_card * card, unsigned char *buf, unsigned short len) | |
201 | 201 | { |
202 | 202 | struct net_local *lp = card->netif; |
203 | 203 | struct sk_buff *skb; |
drivers/isdn/hysdn/hysdn_pof.h
... | ... | @@ -47,20 +47,20 @@ |
47 | 47 | |
48 | 48 | /*--------------------------------------POF file record structs------------*/ |
49 | 49 | typedef struct PofFileHdr_tag { /* Pof file header */ |
50 | -/*00 */ ulong Magic __attribute__((packed)); | |
51 | -/*04 */ ulong N_PofRecs __attribute__((packed)); | |
50 | +/*00 */ unsigned long Magic __attribute__((packed)); | |
51 | +/*04 */ unsigned long N_PofRecs __attribute__((packed)); | |
52 | 52 | /*08 */ |
53 | 53 | } tPofFileHdr; |
54 | 54 | |
55 | 55 | typedef struct PofRecHdr_tag { /* Pof record header */ |
56 | -/*00 */ word PofRecId __attribute__((packed)); | |
57 | -/*02 */ ulong PofRecDataLen __attribute__((packed)); | |
56 | +/*00 */ unsigned short PofRecId __attribute__((packed)); | |
57 | +/*02 */ unsigned long PofRecDataLen __attribute__((packed)); | |
58 | 58 | /*06 */ |
59 | 59 | } tPofRecHdr; |
60 | 60 | |
61 | 61 | typedef struct PofTimeStamp_tag { |
62 | -/*00 */ ulong UnixTime __attribute__((packed)); | |
63 | - /*04 */ uchar DateTimeText[0x28] __attribute__((packed)); | |
62 | +/*00 */ unsigned long UnixTime __attribute__((packed)); | |
63 | + /*04 */ unsigned char DateTimeText[0x28] __attribute__((packed)); | |
64 | 64 | /* =40 */ |
65 | 65 | /*2C */ |
66 | 66 | } tPofTimeStamp; |
drivers/isdn/hysdn/hysdn_procconf.c
... | ... | @@ -36,9 +36,9 @@ |
36 | 36 | int buf_size; /* actual number of bytes in the buffer */ |
37 | 37 | int needed_size; /* needed size when reading pof */ |
38 | 38 | int state; /* actual interface states from above constants */ |
39 | - uchar conf_line[CONF_LINE_LEN]; /* buffered conf line */ | |
40 | - word channel; /* active channel number */ | |
41 | - uchar *pof_buffer; /* buffer when writing pof */ | |
39 | + unsigned char conf_line[CONF_LINE_LEN]; /* buffered conf line */ | |
40 | + unsigned short channel; /* active channel number */ | |
41 | + unsigned char *pof_buffer; /* buffer when writing pof */ | |
42 | 42 | }; |
43 | 43 | |
44 | 44 | /***********************************************************************/ |
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | static int |
50 | 50 | process_line(struct conf_writedata *cnf) |
51 | 51 | { |
52 | - uchar *cp = cnf->conf_line; | |
52 | + unsigned char *cp = cnf->conf_line; | |
53 | 53 | int i; |
54 | 54 | |
55 | 55 | if (cnf->card->debug_flags & LOG_CNF_LINE) |
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 | { |
93 | 93 | struct conf_writedata *cnf; |
94 | 94 | int i; |
95 | - uchar ch, *cp; | |
95 | + unsigned char ch, *cp; | |
96 | 96 | |
97 | 97 | if (!count) |
98 | 98 | return (0); /* nothing to handle */ |
... | ... | @@ -390,7 +390,7 @@ |
390 | 390 | hysdn_procconf_init(void) |
391 | 391 | { |
392 | 392 | hysdn_card *card; |
393 | - uchar conf_name[20]; | |
393 | + unsigned char conf_name[20]; | |
394 | 394 | |
395 | 395 | hysdn_proc_entry = proc_mkdir(PROC_SUBDIR_NAME, proc_net); |
396 | 396 | if (!hysdn_proc_entry) { |
... | ... | @@ -423,7 +423,7 @@ |
423 | 423 | hysdn_procconf_release(void) |
424 | 424 | { |
425 | 425 | hysdn_card *card; |
426 | - uchar conf_name[20]; | |
426 | + unsigned char conf_name[20]; | |
427 | 427 | |
428 | 428 | card = card_root; /* start with first card */ |
429 | 429 | while (card) { |
drivers/isdn/hysdn/hysdn_proclog.c
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | /*************************************************/ |
29 | 29 | struct log_data { |
30 | 30 | struct log_data *next; |
31 | - ulong usage_cnt; /* number of files still to work */ | |
31 | + unsigned long usage_cnt;/* number of files still to work */ | |
32 | 32 | void *proc_ctrl; /* pointer to own control procdata structure */ |
33 | 33 | char log_start[2]; /* log string start (final len aligned by size) */ |
34 | 34 | }; |
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | struct log_data *log_head, *log_tail; /* head and tail for queue */ |
43 | 43 | int if_used; /* open count for interface */ |
44 | 44 | int volatile del_lock; /* lock for delete operations */ |
45 | - uchar logtmp[LOG_MAX_LINELEN]; | |
45 | + unsigned char logtmp[LOG_MAX_LINELEN]; | |
46 | 46 | wait_queue_head_t rd_queue; |
47 | 47 | }; |
48 | 48 | |
49 | 49 | |
... | ... | @@ -153,9 +153,9 @@ |
153 | 153 | static ssize_t |
154 | 154 | hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off) |
155 | 155 | { |
156 | - ulong u = 0; | |
156 | + unsigned long u = 0; | |
157 | 157 | int found = 0; |
158 | - uchar *cp, valbuf[128]; | |
158 | + unsigned char *cp, valbuf[128]; | |
159 | 159 | long base = 10; |
160 | 160 | hysdn_card *card = (hysdn_card *) file->private_data; |
161 | 161 | |
... | ... | @@ -249,7 +249,7 @@ |
249 | 249 | { |
250 | 250 | hysdn_card *card; |
251 | 251 | struct procdata *pd = NULL; |
252 | - ulong flags; | |
252 | + unsigned long flags; | |
253 | 253 | |
254 | 254 | lock_kernel(); |
255 | 255 | card = card_root; |
drivers/isdn/hysdn/hysdn_sched.c
... | ... | @@ -30,7 +30,8 @@ |
30 | 30 | /* to keep the data until later. */ |
31 | 31 | /*****************************************************************************/ |
32 | 32 | int |
33 | -hysdn_sched_rx(hysdn_card * card, uchar * buf, word len, word chan) | |
33 | +hysdn_sched_rx(hysdn_card *card, unsigned char *buf, unsigned short len, | |
34 | + unsigned short chan) | |
34 | 35 | { |
35 | 36 | |
36 | 37 | switch (chan) { |
... | ... | @@ -72,7 +73,9 @@ |
72 | 73 | /* sending. */ |
73 | 74 | /*****************************************************************************/ |
74 | 75 | int |
75 | -hysdn_sched_tx(hysdn_card * card, uchar * buf, word volatile *len, word volatile *chan, word maxlen) | |
76 | +hysdn_sched_tx(hysdn_card *card, unsigned char *buf, | |
77 | + unsigned short volatile *len, unsigned short volatile *chan, | |
78 | + unsigned short maxlen) | |
76 | 79 | { |
77 | 80 | struct sk_buff *skb; |
78 | 81 | |
79 | 82 | |
... | ... | @@ -145,10 +148,10 @@ |
145 | 148 | /* are to be sent and this happens very seldom. */ |
146 | 149 | /*****************************************************************************/ |
147 | 150 | int |
148 | -hysdn_tx_cfgline(hysdn_card * card, uchar * line, word chan) | |
151 | +hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan) | |
149 | 152 | { |
150 | 153 | int cnt = 50; /* timeout intervalls */ |
151 | - ulong flags; | |
154 | + unsigned long flags; | |
152 | 155 | |
153 | 156 | if (card->debug_flags & LOG_SCHED_ASYN) |
154 | 157 | hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1); |
drivers/isdn/hysdn/ince1pc.h
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | * s. RotlCRC algorithm |
63 | 63 | * |
64 | 64 | * RotlCRC algorithm: |
65 | - * ucSum= 0 1 uchar | |
65 | + * ucSum= 0 1 unsigned char | |
66 | 66 | * for all NonEndTokenChunk bytes: |
67 | 67 | * ROTL(ucSum,1) rotate left by 1 |
68 | 68 | * ucSum += Char; add current byte with swap around |
69 | 69 | |
70 | 70 | |
71 | 71 | |
... | ... | @@ -85,13 +85,13 @@ |
85 | 85 | |
86 | 86 | typedef struct ErrLogEntry_tag { |
87 | 87 | |
88 | -/*00 */ ulong ulErrType; | |
88 | +/*00 */ unsigned long ulErrType; | |
89 | 89 | |
90 | -/*04 */ ulong ulErrSubtype; | |
90 | +/*04 */ unsigned long ulErrSubtype; | |
91 | 91 | |
92 | -/*08 */ uchar ucTextSize; | |
92 | +/*08 */ unsigned char ucTextSize; | |
93 | 93 | |
94 | - /*09 */ uchar ucText[ERRLOG_TEXT_SIZE]; | |
94 | + /*09 */ unsigned char ucText[ERRLOG_TEXT_SIZE]; | |
95 | 95 | /* ASCIIZ of len ucTextSize-1 */ |
96 | 96 | |
97 | 97 | /*40 */ |
98 | 98 | |
99 | 99 | |
100 | 100 | |
... | ... | @@ -111,13 +111,13 @@ |
111 | 111 | #define DPRAM_SPOOLER_DATA_SIZE 0x20 |
112 | 112 | typedef struct DpramBootSpooler_tag { |
113 | 113 | |
114 | -/*00 */ uchar Len; | |
114 | +/*00 */ unsigned char Len; | |
115 | 115 | |
116 | -/*01 */ volatile uchar RdPtr; | |
116 | +/*01 */ volatile unsigned char RdPtr; | |
117 | 117 | |
118 | -/*02 */ uchar WrPtr; | |
118 | +/*02 */ unsigned char WrPtr; | |
119 | 119 | |
120 | -/*03 */ uchar Data[DPRAM_SPOOLER_DATA_SIZE]; | |
120 | +/*03 */ unsigned char Data[DPRAM_SPOOLER_DATA_SIZE]; | |
121 | 121 | |
122 | 122 | /*23 */ |
123 | 123 | } tDpramBootSpooler; |