aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/teles3.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-19 22:52:38 -0500
committerJoe Perches <joe@perches.com>2012-02-21 12:04:01 -0500
commit475be4d85a274d0961593db41cf85689db1d583c (patch)
treeb2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hisax/teles3.c
parent0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff)
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style. Update the coding style used on a per-line basis so that git diff -w shows only elided blank lines at EOF. Done with emacs and some scripts and some typing. Built x86 allyesconfig. No detected change in objdump -d or size. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/hisax/teles3.c')
-rw-r--r--drivers/isdn/hisax/teles3.c156
1 files changed, 78 insertions, 78 deletions
diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c
index e9f5bb4cdffa..220b919fafc3 100644
--- a/drivers/isdn/hisax/teles3.c
+++ b/drivers/isdn/hisax/teles3.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * Author Karsten Keil 5 * Author Karsten Keil
6 * Copyright by Karsten Keil <keil@isdn4linux.de> 6 * Copyright by Karsten Keil <keil@isdn4linux.de>
7 * 7 *
8 * This software may be used and distributed according to the terms 8 * This software may be used and distributed according to the terms
9 * of the GNU General Public License, incorporated herein by reference. 9 * of the GNU General Public License, incorporated herein by reference.
10 * 10 *
@@ -22,7 +22,7 @@
22 22
23static const char *teles3_revision = "$Revision: 2.19.2.4 $"; 23static const char *teles3_revision = "$Revision: 2.19.2.4 $";
24 24
25#define byteout(addr,val) outb(val,addr) 25#define byteout(addr, val) outb(val, addr)
26#define bytein(addr) inb(addr) 26#define bytein(addr) inb(addr)
27 27
28static inline u_char 28static inline u_char
@@ -39,13 +39,13 @@ writereg(unsigned int adr, u_char off, u_char data)
39 39
40 40
41static inline void 41static inline void
42read_fifo(unsigned int adr, u_char * data, int size) 42read_fifo(unsigned int adr, u_char *data, int size)
43{ 43{
44 insb(adr, data, size); 44 insb(adr, data, size);
45} 45}
46 46
47static void 47static void
48write_fifo(unsigned int adr, u_char * data, int size) 48write_fifo(unsigned int adr, u_char *data, int size)
49{ 49{
50 outsb(adr, data, size); 50 outsb(adr, data, size);
51} 51}
@@ -65,13 +65,13 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
65} 65}
66 66
67static void 67static void
68ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) 68ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size)
69{ 69{
70 read_fifo(cs->hw.teles3.isacfifo, data, size); 70 read_fifo(cs->hw.teles3.isacfifo, data, size);
71} 71}
72 72
73static void 73static void
74WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) 74WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size)
75{ 75{
76 write_fifo(cs->hw.teles3.isacfifo, data, size); 76 write_fifo(cs->hw.teles3.isacfifo, data, size);
77} 77}
@@ -110,11 +110,11 @@ teles3_interrupt(int intno, void *dev_id)
110 110
111 spin_lock_irqsave(&cs->lock, flags); 111 spin_lock_irqsave(&cs->lock, flags);
112 val = readreg(cs->hw.teles3.hscx[1], HSCX_ISTA); 112 val = readreg(cs->hw.teles3.hscx[1], HSCX_ISTA);
113 Start_HSCX: 113Start_HSCX:
114 if (val) 114 if (val)
115 hscx_int_main(cs, val); 115 hscx_int_main(cs, val);
116 val = readreg(cs->hw.teles3.isac, ISAC_ISTA); 116 val = readreg(cs->hw.teles3.isac, ISAC_ISTA);
117 Start_ISAC: 117Start_ISAC:
118 if (val) 118 if (val)
119 isac_interrupt(cs, val); 119 isac_interrupt(cs, val);
120 count++; 120 count++;
@@ -178,33 +178,33 @@ reset_teles3(struct IsdnCardState *cs)
178 if (cs->typ != ISDN_CTYPE_TELESPCMCIA) { 178 if (cs->typ != ISDN_CTYPE_TELESPCMCIA) {
179 if ((cs->hw.teles3.cfg_reg) && (cs->typ != ISDN_CTYPE_COMPAQ_ISA)) { 179 if ((cs->hw.teles3.cfg_reg) && (cs->typ != ISDN_CTYPE_COMPAQ_ISA)) {
180 switch (cs->irq) { 180 switch (cs->irq) {
181 case 2: 181 case 2:
182 case 9: 182 case 9:
183 irqcfg = 0x00; 183 irqcfg = 0x00;
184 break; 184 break;
185 case 3: 185 case 3:
186 irqcfg = 0x02; 186 irqcfg = 0x02;
187 break; 187 break;
188 case 4: 188 case 4:
189 irqcfg = 0x04; 189 irqcfg = 0x04;
190 break; 190 break;
191 case 5: 191 case 5:
192 irqcfg = 0x06; 192 irqcfg = 0x06;
193 break; 193 break;
194 case 10: 194 case 10:
195 irqcfg = 0x08; 195 irqcfg = 0x08;
196 break; 196 break;
197 case 11: 197 case 11:
198 irqcfg = 0x0A; 198 irqcfg = 0x0A;
199 break; 199 break;
200 case 12: 200 case 12:
201 irqcfg = 0x0C; 201 irqcfg = 0x0C;
202 break; 202 break;
203 case 15: 203 case 15:
204 irqcfg = 0x0E; 204 irqcfg = 0x0E;
205 break; 205 break;
206 default: 206 default:
207 return(1); 207 return (1);
208 } 208 }
209 byteout(cs->hw.teles3.cfg_reg + 4, irqcfg); 209 byteout(cs->hw.teles3.cfg_reg + 4, irqcfg);
210 HZDELAY(HZ / 10 + 1); 210 HZDELAY(HZ / 10 + 1);
@@ -223,7 +223,7 @@ reset_teles3(struct IsdnCardState *cs)
223 HZDELAY(2); 223 HZDELAY(2);
224 } 224 }
225 } 225 }
226 return(0); 226 return (0);
227} 227}
228 228
229static int 229static int
@@ -232,36 +232,36 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg)
232 u_long flags; 232 u_long flags;
233 233
234 switch (mt) { 234 switch (mt) {
235 case CARD_RESET: 235 case CARD_RESET:
236 spin_lock_irqsave(&cs->lock, flags); 236 spin_lock_irqsave(&cs->lock, flags);
237 reset_teles3(cs); 237 reset_teles3(cs);
238 spin_unlock_irqrestore(&cs->lock, flags); 238 spin_unlock_irqrestore(&cs->lock, flags);
239 return(0); 239 return (0);
240 case CARD_RELEASE: 240 case CARD_RELEASE:
241 release_io_teles3(cs); 241 release_io_teles3(cs);
242 return(0); 242 return (0);
243 case CARD_INIT: 243 case CARD_INIT:
244 spin_lock_irqsave(&cs->lock, flags); 244 spin_lock_irqsave(&cs->lock, flags);
245 inithscxisac(cs, 3); 245 inithscxisac(cs, 3);
246 spin_unlock_irqrestore(&cs->lock, flags); 246 spin_unlock_irqrestore(&cs->lock, flags);
247 return(0); 247 return (0);
248 case CARD_TEST: 248 case CARD_TEST:
249 return(0); 249 return (0);
250 } 250 }
251 return(0); 251 return (0);
252} 252}
253 253
254#ifdef __ISAPNP__ 254#ifdef __ISAPNP__
255 255
256static struct isapnp_device_id teles_ids[] __devinitdata = { 256static struct isapnp_device_id teles_ids[] __devinitdata = {
257 { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), 257 { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110),
258 ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), 258 ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110),
259 (unsigned long) "Teles 16.3 PnP" }, 259 (unsigned long) "Teles 16.3 PnP" },
260 { ISAPNP_VENDOR('C', 'T', 'X'), ISAPNP_FUNCTION(0x0), 260 { ISAPNP_VENDOR('C', 'T', 'X'), ISAPNP_FUNCTION(0x0),
261 ISAPNP_VENDOR('C', 'T', 'X'), ISAPNP_FUNCTION(0x0), 261 ISAPNP_VENDOR('C', 'T', 'X'), ISAPNP_FUNCTION(0x0),
262 (unsigned long) "Creatix 16.3 PnP" }, 262 (unsigned long) "Creatix 16.3 PnP" },
263 { ISAPNP_VENDOR('C', 'P', 'Q'), ISAPNP_FUNCTION(0x1002), 263 { ISAPNP_VENDOR('C', 'P', 'Q'), ISAPNP_FUNCTION(0x1002),
264 ISAPNP_VENDOR('C', 'P', 'Q'), ISAPNP_FUNCTION(0x1002), 264 ISAPNP_VENDOR('C', 'P', 'Q'), ISAPNP_FUNCTION(0x1002),
265 (unsigned long) "Compaq ISDN S0" }, 265 (unsigned long) "Compaq ISDN S0" },
266 { 0, } 266 { 0, }
267}; 267};
@@ -286,22 +286,22 @@ setup_teles3(struct IsdnCard *card)
286#ifdef __ISAPNP__ 286#ifdef __ISAPNP__
287 if (!card->para[1] && isapnp_present()) { 287 if (!card->para[1] && isapnp_present()) {
288 struct pnp_dev *pnp_d; 288 struct pnp_dev *pnp_d;
289 while(ipid->card_vendor) { 289 while (ipid->card_vendor) {
290 if ((pnp_c = pnp_find_card(ipid->card_vendor, 290 if ((pnp_c = pnp_find_card(ipid->card_vendor,
291 ipid->card_device, pnp_c))) { 291 ipid->card_device, pnp_c))) {
292 pnp_d = NULL; 292 pnp_d = NULL;
293 if ((pnp_d = pnp_find_dev(pnp_c, 293 if ((pnp_d = pnp_find_dev(pnp_c,
294 ipid->vendor, ipid->function, pnp_d))) { 294 ipid->vendor, ipid->function, pnp_d))) {
295 int err; 295 int err;
296 296
297 printk(KERN_INFO "HiSax: %s detected\n", 297 printk(KERN_INFO "HiSax: %s detected\n",
298 (char *)ipid->driver_data); 298 (char *)ipid->driver_data);
299 pnp_disable_dev(pnp_d); 299 pnp_disable_dev(pnp_d);
300 err = pnp_activate_dev(pnp_d); 300 err = pnp_activate_dev(pnp_d);
301 if (err<0) { 301 if (err < 0) {
302 printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", 302 printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n",
303 __func__, err); 303 __func__, err);
304 return(0); 304 return (0);
305 } 305 }
306 card->para[3] = pnp_port_start(pnp_d, 2); 306 card->para[3] = pnp_port_start(pnp_d, 2);
307 card->para[2] = pnp_port_start(pnp_d, 1); 307 card->para[2] = pnp_port_start(pnp_d, 1);
@@ -309,9 +309,9 @@ setup_teles3(struct IsdnCard *card)
309 card->para[0] = pnp_irq(pnp_d, 0); 309 card->para[0] = pnp_irq(pnp_d, 0);
310 if (!card->para[0] || !card->para[1] || !card->para[2]) { 310 if (!card->para[0] || !card->para[1] || !card->para[2]) {
311 printk(KERN_ERR "Teles PnP:some resources are missing %ld/%lx/%lx\n", 311 printk(KERN_ERR "Teles PnP:some resources are missing %ld/%lx/%lx\n",
312 card->para[0], card->para[1], card->para[2]); 312 card->para[0], card->para[1], card->para[2]);
313 pnp_disable_dev(pnp_d); 313 pnp_disable_dev(pnp_d);
314 return(0); 314 return (0);
315 } 315 }
316 break; 316 break;
317 } else { 317 } else {
@@ -320,21 +320,21 @@ setup_teles3(struct IsdnCard *card)
320 } 320 }
321 ipid++; 321 ipid++;
322 pnp_c = NULL; 322 pnp_c = NULL;
323 } 323 }
324 if (!ipid->card_vendor) { 324 if (!ipid->card_vendor) {
325 printk(KERN_INFO "Teles PnP: no ISAPnP card found\n"); 325 printk(KERN_INFO "Teles PnP: no ISAPnP card found\n");
326 return(0); 326 return (0);
327 } 327 }
328 } 328 }
329#endif 329#endif
330 if (cs->typ == ISDN_CTYPE_16_3) { 330 if (cs->typ == ISDN_CTYPE_16_3) {
331 cs->hw.teles3.cfg_reg = card->para[1]; 331 cs->hw.teles3.cfg_reg = card->para[1];
332 switch (cs->hw.teles3.cfg_reg) { 332 switch (cs->hw.teles3.cfg_reg) {
333 case 0x180: 333 case 0x180:
334 case 0x280: 334 case 0x280:
335 case 0x380: 335 case 0x380:
336 cs->hw.teles3.cfg_reg |= 0xc00; 336 cs->hw.teles3.cfg_reg |= 0xc00;
337 break; 337 break;
338 } 338 }
339 cs->hw.teles3.isac = cs->hw.teles3.cfg_reg - 0x420; 339 cs->hw.teles3.isac = cs->hw.teles3.cfg_reg - 0x420;
340 cs->hw.teles3.hscx[0] = cs->hw.teles3.cfg_reg - 0xc20; 340 cs->hw.teles3.hscx[0] = cs->hw.teles3.cfg_reg - 0xc20;
@@ -374,9 +374,9 @@ setup_teles3(struct IsdnCard *card)
374 if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) { 374 if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) {
375 if (!request_region(cs->hw.teles3.cfg_reg, 1, "teles3 cfg")) { 375 if (!request_region(cs->hw.teles3.cfg_reg, 1, "teles3 cfg")) {
376 printk(KERN_WARNING 376 printk(KERN_WARNING
377 "HiSax: %s config port %x already in use\n", 377 "HiSax: %s config port %x already in use\n",
378 CardType[card->typ], 378 CardType[card->typ],
379 cs->hw.teles3.cfg_reg); 379 cs->hw.teles3.cfg_reg);
380 return (0); 380 return (0);
381 } 381 }
382 } else { 382 } else {
@@ -385,14 +385,14 @@ setup_teles3(struct IsdnCard *card)
385 "HiSax: %s config port %x-%x already in use\n", 385 "HiSax: %s config port %x-%x already in use\n",
386 CardType[card->typ], 386 CardType[card->typ],
387 cs->hw.teles3.cfg_reg, 387 cs->hw.teles3.cfg_reg,
388 cs->hw.teles3.cfg_reg + 8); 388 cs->hw.teles3.cfg_reg + 8);
389 return (0); 389 return (0);
390 } 390 }
391 } 391 }
392 } 392 }
393 if (!request_region(cs->hw.teles3.isac + 32, 32, "HiSax isac")) { 393 if (!request_region(cs->hw.teles3.isac + 32, 32, "HiSax isac")) {
394 printk(KERN_WARNING 394 printk(KERN_WARNING
395 "HiSax: %s isac ports %x-%x already in use\n", 395 "HiSax: %s isac ports %x-%x already in use\n",
396 CardType[cs->typ], 396 CardType[cs->typ],
397 cs->hw.teles3.isac + 32, 397 cs->hw.teles3.isac + 32,
398 cs->hw.teles3.isac + 64); 398 cs->hw.teles3.isac + 64);
@@ -407,7 +407,7 @@ setup_teles3(struct IsdnCard *card)
407 } 407 }
408 if (!request_region(cs->hw.teles3.hscx[0] + 32, 32, "HiSax hscx A")) { 408 if (!request_region(cs->hw.teles3.hscx[0] + 32, 32, "HiSax hscx A")) {
409 printk(KERN_WARNING 409 printk(KERN_WARNING
410 "HiSax: %s hscx A ports %x-%x already in use\n", 410 "HiSax: %s hscx A ports %x-%x already in use\n",
411 CardType[cs->typ], 411 CardType[cs->typ],
412 cs->hw.teles3.hscx[0] + 32, 412 cs->hw.teles3.hscx[0] + 32,
413 cs->hw.teles3.hscx[0] + 64); 413 cs->hw.teles3.hscx[0] + 64);
@@ -423,7 +423,7 @@ setup_teles3(struct IsdnCard *card)
423 } 423 }
424 if (!request_region(cs->hw.teles3.hscx[1] + 32, 32, "HiSax hscx B")) { 424 if (!request_region(cs->hw.teles3.hscx[1] + 32, 32, "HiSax hscx B")) {
425 printk(KERN_WARNING 425 printk(KERN_WARNING
426 "HiSax: %s hscx B ports %x-%x already in use\n", 426 "HiSax: %s hscx B ports %x-%x already in use\n",
427 CardType[cs->typ], 427 CardType[cs->typ],
428 cs->hw.teles3.hscx[1] + 32, 428 cs->hw.teles3.hscx[1] + 32,
429 cs->hw.teles3.hscx[1] + 64); 429 cs->hw.teles3.hscx[1] + 64);